Skip to content

repair some bug on perfectScale #40

@importos

Description

@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);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions