thecodealer / vue-panzoom

Vue plugin to zoom/pan dom elements
MIT License
89 stars 20 forks source link

Set Initial Zoom #21

Closed chasen-bettinger closed 3 years ago

chasen-bettinger commented 3 years ago

Using the lib like this:


    <panZoom selector="#g1" @init="onInit">

methods: {
    onInit: function (panzoomInstance, id) {
      console.log('panzoomInstance :>> ', panzoomInstance)
      panzoomInstance.setMaxZoom(5)

      // panzoomInstance.zoomTo(0, 2000, 4)
      // panzoomInstance.zoomAbs(0, 1000, 5)

    },
  },

Neither zoomTo or zoomAbs zooms into the picture. Thoughts?

SuharshTyagii commented 3 years ago

Did you solve it? Cam't access half the functions with the panzoomInstance any other way around it ?

thecodealer commented 3 years ago

Using the lib like this:


    <panZoom selector="#g1" @init="onInit">

methods: {
    onInit: function (panzoomInstance, id) {
      console.log('panzoomInstance :>> ', panzoomInstance)
      panzoomInstance.setMaxZoom(5)

      // panzoomInstance.zoomTo(0, 2000, 4)
      // panzoomInstance.zoomAbs(0, 1000, 5)

    },
  },

Neither zoomTo or zoomAbs zooms into the picture. Thoughts?

@chasen-bettinger can you share a fiddle? I can't reproduce your issue

thecodealer commented 3 years ago

Did you solve it? Cam't access half the functions with the panzoomInstance any other way around it ?

can you share your code and how you're doing it?

thecodealer commented 3 years ago

Closing this for inactivity