You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may be missing something but after debugging the initialization code for svgPan, this expression $el.data('SVGPan') never evaluates to false and as a consequence neither does this: if ($el.is('svg') && $el.data('SVGPan') !== true) {
It actually never detects that the plugin is already initialized, and initializes the plugin multiple times duplicates the plugin behavior... calls the event handling 5x
I came across this because I have to delete the viewport and recreate multiple times, to handle window resize, and was getting strange behaviour due to having this.
The text was updated successfully, but these errors were encountered:
I may be missing something but after debugging the initialization code for svgPan, this expression $el.data('SVGPan') never evaluates to false and as a consequence neither does this: if ($el.is('svg') && $el.data('SVGPan') !== true) {
so in practice using the demo.html file and doing
$('svg').svgPan('viewport');
$('svg').svgPan('viewport');
$('svg').svgPan('viewport');
$('svg').svgPan('viewport');
$('svg').svgPan('viewport');
It actually never detects that the plugin is already initialized, and initializes the plugin multiple times duplicates the plugin behavior... calls the event handling 5x
I came across this because I have to delete the viewport and recreate multiple times, to handle window resize, and was getting strange behaviour due to having this.
The text was updated successfully, but these errors were encountered: