Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repair some bug on perfectScale #40

Open
importos opened this issue Jan 9, 2018 · 1 comment
Open

repair some bug on perfectScale #40

importos opened this issue Jan 9, 2018 · 1 comment

Comments

@importos
Copy link

importos commented Jan 9, 2018

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);
    }
}
@Gregwar
Copy link
Owner

Gregwar commented Jan 9, 2018

Hello,

Would you mind opening a pull request instead?

Thanks for contributing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants