Fix rescale bug

This commit is contained in:
Anatolie Rotaru 2014-04-04 12:54:33 +03:00
parent df0ee70e36
commit 06cdff3612
1 changed files with 3 additions and 3 deletions

View File

@ -180,9 +180,9 @@ rescale = function(factor) {
}
conf.scale = factor;
x = c.width - c.width * factor;
y = c.height - c.height * factor;
c.style[tp] = "scale(" + conf.scale + ") translate(-" + x + "px, -" + y + "px)";
x = -((c.width - c.width * factor) / 2 / factor);
y = -((c.height - c.height * factor) / 2 / factor);
c.style[tp] = "scale(" + conf.scale + ") translate(" + x + "px, " + y + "px)";
};
setFillColor = function(color) {