fix auto layout button

This commit is contained in:
Lukas F. Hartmann 2018-05-03 15:37:59 +02:00
parent 5f4d41f3a4
commit 4c5e6ea286

View File

@ -587,7 +587,7 @@ var SpacedeckBoardArtifacts = {
var selected = this.selected_artifacts(); var selected = this.selected_artifacts();
if (selected.length<2) return; if (selected.length<2) return;
var sorted = _.sortBy(selected, function(a) { return a.x+a.y*this.active_space.advanced.width }.bind(this)); var sorted = _.sortBy(selected, function(a) { return a.x+a.y*this.active_space.width }.bind(this));
var minx = sorted[0].x; var minx = sorted[0].x;
var miny = sorted[0].y; var miny = sorted[0].y;
@ -596,11 +596,13 @@ var SpacedeckBoardArtifacts = {
var blocks = []; var blocks = [];
var padding = 10;
for (var i=0; i<sorted.length; i++) { for (var i=0; i<sorted.length; i++) {
var a = sorted[i]; var a = sorted[i];
blocks.push({ blocks.push({
w: a.w, w: a.w+padding,
h: a.h, h: a.h+padding,
a: a a: a
}); });
} }