I have to separate functions. The first function gets overrode by the second. What can I do to prevent this?
app.utilitySelector = new utilitySelectorModule();
app.utilitySelector.init();
var utilitySelectorToolBtn = dom.byId("PMSelect");
on(utilitySelectorToolBtn, "click", function (event) {
if (app.utilitySelector.isVisible === true) {
app.utilitySelector.hide();
} else { // not open
app.utilitySelector.show();
}
});
on(dom.byId("Pane"), "click", function(){
var dnd = new Moveable(dom.byId("Pane"));
});
The first functions opens a dojo content pane from a button onlick. The second function makes the content pane moveable. The functionality of the content pane is suspended as soon as the content pane is moved.
Any suggestions?
Brandon,
Why are you waiting for someone to click on the panel before making it movable? You should just make it movable when the dom is ready.
I was trying to use this: Esri JS API Draggable Popups - JSFiddle that was in this thread: Move the popup widow in WAB
So is this a JS api app or a WAB app?
JS api
Brandon,
OK, so like in that sample code you are referring to the popup gets set as the dnd target before it is even shown.
Yes. The drag function of the content pane works, but the functionality of the content pane itself is shut off (which is a bunch of drop down menus) once I drag it.
Can you provide a simplified sample app that demos your issue?
Hi Robert,
I am going to work on this with my tutor this afternoon.
Off topic from this thread, but do you know how to add a close button to a content pane by chance?