Closed alekbless closed 4 years ago
You have 2 options
The instance is available as the first argument in the "init" event callback like so: In your template
<panZoom @init="onInit"></panZoom>
Add this to your component's methods
onInit: function(panzoomInstance, id) {
panzoomInstance.isPaused();
}
The instance is available as $panZoomInstance on the panZoom component instance. Here's how it should look: In your template
<panZoom ref="panZoomItem"></panZoom>
Then you can do this in your script
this.$refs['panZoomItem'].$panZoomInstance.isPaused()
You have 2 options
Option 1 (using the init event):
The instance is available as the first argument in the "init" event callback like so: In your template
<panZoom @init="onInit"></panZoom>
Add this to your component's methods
onInit: function(panzoomInstance, id) { panzoomInstance.isPaused(); }
Option 2 (using ref):
The instance is available as $panZoomInstance on the panZoom component instance. Here's how it should look: In your template
<panZoom ref="panZoomItem"></panZoom>
Then you can do this in your script
this.$refs['panZoomItem'].$panZoomInstance.isPaused()
@mistabiggx Thank you for providing this. I was able to pause panning with Option 2 :)
Hello!
How can I retrieve/set the instance name of the panzoom component? I would like to pause panning but do now know how to access the instance.
From the original package: