question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Zoom Buttons – destroy() not fully removing them

See original GitHub issue

I’ve got custom elements set for my zoomInButton and zoomOutButton:

OpenSeadragon({
   ...
   zoomInButton:  "zoomInDiv",
   zoomOutButton: "zoomOutDiv",
   ...
});

After destroying a Viewer and subsequently creating a new one, these zoom buttons still work but also log the following errors to the console: – Cannot set property 'lastZoomTime' of undefinedCannot set property 'zooming' of undefined

Screenshot of the console included as well: Screen Shot 2020-11-20 at 7 32 05 PM

_Originally posted by @mattwolff in https://github.com/openseadragon/openseadragon/issues/1878#issuecomment-731474734_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DannyJoriscommented, Jun 21, 2022

If you’re in a situation like us where you can’t upgrade to 3.0.0 yet, this is a workaround that worked for us:

viewer.zoomInButton.tracker.destroy();
viewer.zoomOutButton.tracker.destroy();
viewer.destroy();
1reaction
mattwolffcommented, Mar 21, 2021

Yes, just tested it out and this is no longer an issue – amazing overhaul.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manually leave the meeting in case internet lost - iOS
When the internet is lost, when i destroy my custom UI without calling .leave, my audio and video stream still alive in the...
Read more >
javascript - highcharts reset zoom button
destroy() function can be invoked only if resetZoomButton is an object. According to Highsotck source: For Stock charts (...) X axis zooming is ......
Read more >
MapView | API Reference | ArcGIS Maps SDK for ...
A MapView may not be immediately ready for display after it has been constructed. ... To prevent these components from being destroyed, remove...
Read more >
Using JQuery Zoom and JavaScript Zoom for Product ...
Image zoom is an important product feature for merchants, allowing buyers to enlarge product photos for better viewing.
Read more >
The best way of setting up Zoom inside your Angular app
Before opening a meeting, JS and WebAssembly scripts from the SDK have to be loaded, but once you have loaded them you cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found