You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to read: dialog.dialog().parents('.ui-dialog').draggable('option', 'snap', '.ui-draggable, #sidebar');
(I don't have my test code in my editor still, so the details on the selectors may be wrong, so verify.)
Bonus if someone could figure out how to make them dock instead of just snap so that as the sidebar changes size, the dialogs stay relative. But I did not see anything in my few minutes of checking the jQuery UI documentation.
The text was updated successfully, but these errors were encountered:
Was doing some more research. Just capturing some thoughts while in my head. May be completely off:
Make dialogs droppable as well as draggable, use a tolerance of fit
When drop event received by a droppable, use .position() to tie the items together and listener on some TBD event on the draggable
When TBD event received by droppable, undo the work by .position()
Assume the hand-wavy stuff works, that would probably handle the case when the sidebar changes sizes. But unsure what to do when the sidebar is toggled. (Maybe instead make it possible for a draggable to go into the sidebar as a sortable? Dunno, just making things up at this point. Time for bed.)
TIL that the
dialog()
wrapper sets up snapping by default. Well, at least to other draggables.What about defaulting them to also snap to the sidebar?
It looks like the change is simple enough. Change this line:
ingress-intel-total-conversion/core/code/dialog.js
Line 238 in 199c9f7
to read:
dialog.dialog().parents('.ui-dialog').draggable('option', 'snap', '.ui-draggable, #sidebar');
(I don't have my test code in my editor still, so the details on the selectors may be wrong, so verify.)
Bonus if someone could figure out how to make them dock instead of just snap so that as the sidebar changes size, the dialogs stay relative. But I did not see anything in my few minutes of checking the jQuery UI documentation.
The text was updated successfully, but these errors were encountered: