html {
transform: scale(1.5);
transform-origin: top left;
width: 66.66%;
height: 66.66%;
}
Unfortunately, the drop-down menus activated from the menu bar are placed in the wrong position (Tested on Chromium & Firefox).
Unfortunately not all browsers support the CSS “zoom” attribute, which works correctly (tested on Chromium).
Do you know a possible work-around, path code or an idea to deal with this problem?
I’ve analyzed the problem. It is a matter of the implementation of the class dojo/dom-geometry, method ::position() because it uses at row 479 (rel.1.13.0 ) the native method node.getBoundingClientRect() that return coordinates in pixels with the zoom applied to “html” TAG;
A work around was to replace the next row 480 with the next two rows to restore the original scale:
The best path is to replace rows 479-480 with this row:
var ret = {x: node.offsetLeft, y: node.offsetTop, w: node.clientWidth, h: node.clientHeight };
(Tested on Firefox & Chromium)
Method getBoundingClientRect is used in other classes, so I think the problem persists if we use other parts of Dojo Toolkit.
A question to the Dojo Toolkit authors: is there a particular reason to use the getBoundingClientRect method instead of attributes?
Do you consider it appropriate to deprecate the use of getBoundingClientRect?
Ok, thanks.
I looked in the code how many occurrences of “getBoundingClientRect” there are and there are few.
We could replace the standard method with a new method (same name or like) of the dojo/dom-geometry class that also works with scale transformations in CSS.
Unfortunately I’m not familiar with Git (we use Subversion at the company) but I can try to use it after I’ve tested the modifications suggested here.