Unverified Commit 81d58712 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera
Browse files

fix: avoid setting zoom twice

parent cdf2a021
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -275,9 +275,12 @@ export default {
        },

        setZoom(newVal) {
          const zoom = blueprint.leafletRef.getZoom();
          if (newVal !== zoom) {
            blueprint.leafletRef.setZoom(newVal, {
              animate: props.noBlockingAnimations ? false : null,
            });
          }
        },

        setPaddingBottomRight(newVal) {
@@ -331,6 +334,7 @@ export default {
            oldCenter.lng !== newCenter.lng
          ) {
            blueprint.lastSetCenter = newCenter;
            console.log("setCenter");
            blueprint.leafletRef.panTo(newCenter, {
              animate: this.noBlockingAnimations ? false : null,
            });