More cross-browser way for rescaling, using the original 'tp' variable and post-fixing 'Origin' for transformOrigin. Haven't yet tested for non-Firefox browsers though, but I think this should work.

This commit is contained in:
daniel kho 2011-09-11 17:12:50 +08:00
parent 6647cc90bf
commit ddc634fff8
1 changed files with 2 additions and 2 deletions

View File

@ -267,8 +267,8 @@ rescaleAuto = function() {
factor=xFactor<yFactor?xFactor:yFactor;
factor-=0.01;
c.style.MozTransform = "scale(" + factor + ")";
c.style.MozTransformOrigin = "top left";
c.style[tp] = "scale(" + factor + ")";
c.style[tp+'Origin'] = "top left";
UI.rfb.get_mouse().set_scale(factor);
};