-
-
Save mnickel/743559 to your computer and use it in GitHub Desktop.
Problem disposing a widget that has a defined id.. I'm creating a widget lyb.widgets.svgEditorViewer and giving it an id: "svgEditorViewer" so that I can refer to it in another place... However, on the dispose event I get some javascript errors in the
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jojo.ns("lyb.widgets"); | |
(function() { | |
lyb.widgets.booksViewer = jojo.widget.create({ | |
name: "lyb.widgets.booksViewer", | |
path: "/widgets/booksViewer/booksViewer", | |
prototype: { | |
initialize: function($super, options) { | |
$super(options); | |
}, | |
onReady: function(args) { | |
var me = this, | |
domEvents = this.domEvents; | |
domEvents.bind(me.get("#clickSvgTest"), "click", function() { | |
//load the tagger widget | |
var svgEditor = new lyb.widgets.svgEditorViewer({ | |
parent: me, | |
id: "svgEditorViewer", | |
on: { | |
disposed: function() { | |
//fsm.fire("cancelAction", args); | |
svgEditor.dispose(); | |
} | |
}, | |
bookArgs: { | |
bookId: 839, | |
sheetId: 140121, | |
version: 3 | |
} | |
}); | |
svgEditor.load(); | |
}); | |
} | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment