Closed fsteinmetz closed 6 years ago
Just looking at the code (I have not tried it), I would replace
if (options && options.disableViewprereset) {
with
var doit = options && options.disableViewprereset && obj && obj._events;
if (doit) {
(the if statement in two places)
Indeed I have tested and it works. Should probably be adopted as an immediate solution.
But this still leaves an annoying flicker that is mentioned in the comment. Any idea how to deal with it ?
Fiddle updated with new release 0.2.2 which fixes the bug but leaves the flicker. https://jsfiddle.net/frstz/563wsxp7
@fsteinmetz Have you tried with the last version of Leaflet (1.2.0)? The hack to avoid the flicker is not working properly on 0.7.
In summary: we have to do a "reset" to locate properly the tiles, but do not reload all the tiles (that causes the flicker). In 1.2.0 it is done hacking the event viewprereset
, that runs _invalidateAll
, but in 0.7 I do not see any way. Suggestions are welcome.
Indeed it works perfectly with Leaflet 1.2.0 I didn't notice I wasn't using the latest version. Fiddle updated with Leaflet 1.2.0 : https://jsfiddle.net/frstz/563wsxp7 Thanks for your help, using Leaflet.Sync in GoldenLayout really opens up awesome possibilities. I'm closing the issue :)
There is a problem when using Leaflet.Sync in Golden-Layout.
See the following fiddle : https://jsfiddle.net/frstz/563wsxp7/5/