From 32323cbc5739582f38ca60c7ce0368754a801bfe Mon Sep 17 00:00:00 2001 From: mntmn Date: Sun, 27 Sep 2020 23:54:22 +0200 Subject: [PATCH] space: fix initial position for new shapes --- public/javascripts/spacedeck_sections.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/javascripts/spacedeck_sections.js b/public/javascripts/spacedeck_sections.js index a8d91e1..d587a38 100644 --- a/public/javascripts/spacedeck_sections.js +++ b/public/javascripts/spacedeck_sections.js @@ -1717,15 +1717,15 @@ var SpacedeckSections = { w = 400; } - //var point = this.find_place_for_item(w,h); var point = this.cursor_point_to_space(evt); + point.z = this.highest_z()+1; var a = { space_id: this.active_space._id, mime: "x-spacedeck/shape", description: "", - x: point.x, - y: point.y, + x: point.x+w/2, + y: point.y+h/2, z: point.z, w: w, h: h,