Content Pane Functionality is overrode when moveable (dnd) function is added

1454
24
01-16-2018 08:47 AM
BrandonPrice
Occasional Contributor

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?

https://community.esri.com/community/developers/gis-developers?sr=search&searchId=bcfa4c7a-04aa-4d71...

https://community.esri.com/groups/web-app-builder-custom-widgets?sr=search&searchId=a21eafc1-98af-47...

0 Kudos
24 Replies
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
BrandonPrice
Occasional Contributor

I was trying to use this: Esri JS API Draggable Popups - JSFiddle that was in this thread: Move the popup widow in WAB 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

So is this a JS api app or a WAB app?

0 Kudos
BrandonPrice
Occasional Contributor

JS api

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
BrandonPrice
Occasional Contributor

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. 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Can you provide a simplified sample app that demos your issue?

0 Kudos
BrandonPrice
Occasional Contributor

Hi Robert,

I am going to work on this with my tutor this afternoon.

0 Kudos
BrandonPrice
Occasional Contributor

Off topic from this thread, but do you know how to add a close button to a content pane by chance?

0 Kudos