Closed nono closed 11 years ago
pageDimensions gets called quite a lot. Adding stuff to the DOM, styling it and removing it each time is a bit nasty. Can we look at being kinder on the DOM? If it only affects WebKit, perhaps we should fence it in a WebKit-only conditional too?
Can we look at being kinder on the DOM?
Yes, do you have any idea about that? Computing this value only one time and hoping the user won't change his zoom level after that?
If it only affects WebKit, perhaps we should fence it in a WebKit-only conditional too?
Yes, I didn't look at src/compat/env.js
and thought that Monocle.Browser.env.roundPageDimensions
was only for WebKit. But it's not the case, so I should modify that.
By the way, zooming on firefox 16 works better when I don't do the rounding.
What about using the resize event to compute the zoom level only when changed ?
Closed because see comments on #161. Thanks.
Hi,
when using Monocle on Chrome 22+ (with sub-pixel rendering) and zooming (in or out), the pages can be cut on the left or right when we advance far in a component.This commit can be the start of a fix for this issue.