space: fix initial position for new shapes

This commit is contained in:
mntmn
2020-09-27 23:54:22 +02:00
parent cbd0034be1
commit 32323cbc57

View File

@@ -1717,15 +1717,15 @@ var SpacedeckSections = {
w = 400; w = 400;
} }
//var point = this.find_place_for_item(w,h);
var point = this.cursor_point_to_space(evt); var point = this.cursor_point_to_space(evt);
point.z = this.highest_z()+1;
var a = { var a = {
space_id: this.active_space._id, space_id: this.active_space._id,
mime: "x-spacedeck/shape", mime: "x-spacedeck/shape",
description: "", description: "",
x: point.x, x: point.x+w/2,
y: point.y, y: point.y+h/2,
z: point.z, z: point.z,
w: w, w: w,
h: h, h: h,