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.

Navigator in Custom Location - Exception Thrown on destroy()

See original GitHub issue

When the Navigator is used in a custom location, e.g.

    OpenSeadragon({
        ...
        showNavigator:  true,
        navigatorId:   "navigatorDiv",
        ...
    });

If destroy() is called on the navigator’s Viewer, an exception is thrown. This occurs when Control.destroy() calls Node.removeChild() to remove the Navigator, which isn’t a child of any control container.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
woodchuckcommented, Sep 8, 2020

This works for me:

    destroy: function() {
        this.wrapper.removeChild( this.element );
        if ( this.anchor !== $.ControlAnchor.NONE ) {
            this.container.removeChild( this.wrapper );
        }
    },
1reaction
msalsberycommented, Aug 27, 2020

@zero41120 Thank you for that. I don’t think we should even be calling removeChild if the navigator is placed in an external element, Hopefully just a check for the anchor being $.ControlAnchor.NONE should be done

@JoFrMueller would you be up for fixing this as a follow-up to your #1832?

If not, I’ll take this one…

Read more comments on GitHub >

github_iconTop Results From Across the Web

c++ - How to destroy local variables if exceptions thrown by a ...
Put a top-level try-catch(...) in your main function that outputs an error message and exits. This will ensure that unwinding always happens ...
Read more >
Basic Concepts in Using Managed Exceptions | Microsoft Learn
If an unmanaged type is caught by catch(Object^), it will not destroy the thrown object. When throwing or catching unmanaged exceptions, we ...
Read more >
Top 15 C++ Exception handling mistakes and how to avoid ...
Mistake # 5: Throwing exceptions in destructors or in overloaded delete or delete[] operator ... If a destructor is invoked during the stack- ......
Read more >
WebView - Android Developers
android:nextClusterForward, Defines the next keyboard navigation cluster. ... and that an exception should be thrown if a WebView is created or any other ......
Read more >
JavaServer Pages (JSP) - A Tutorial
destroy() runs only once when the servlet is unloaded from the server. public void ... ServletException { // JSP pre-defined variables (in service()...
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