mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48:12 +00:00
[Drag-Drop] Prevent redundant drops
Mark default as prevented and check for prevention of default when handling mctDrop events (which allow views to follow up on drop gestures by positioning objects within themselves) avoiding redundant drops into embedded views. WTD-1233.
This commit is contained in:
@ -249,6 +249,10 @@ define(
|
||||
|
||||
// Position a panel after a drop event
|
||||
function handleDrop(e, id, position) {
|
||||
// Don't handle this event if it has already been handled
|
||||
if (e.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
// Store the position of this element.
|
||||
addElement({
|
||||
type: "fixed.telemetry",
|
||||
@ -372,4 +376,4 @@ define(
|
||||
|
||||
return FixedController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user