importos
Blocks.prototype.perfectScale = function() { if (!this.div) { return; } var xMin = null, xMax = null; var yMin = null, yMax = null; for (var k in this.blocks) { var block = this.blocks[k]; if (xMin == null) { xMin = block.x-15 xMax = block.x+block.width+18; yMin = block.y-15 yMax = block.y+115; } else { xMin = Math.min(xMin, block.x-15); xMax = Math.max(xMax, block.x+block.width+18); yMin = Math.min(yMin, block.y-15); yMax = Math.max(yMax, block.y+115); } }