Canvas: Overlapping elements bugfix (#52343)

pull/52363/head
Adela Almasan 3 years ago committed by GitHub
parent 433bb735de
commit 57249aa408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      public/app/features/canvas/runtime/scene.tsx

@ -311,6 +311,8 @@ export class Scene {
container: this.div,
selectableTargets: targetElements,
toggleContinueSelect: 'shift',
selectFromInside: false,
hitRate: 0,
});
this.moveable = new Moveable(this.div!, {
@ -420,12 +422,15 @@ export class Scene {
targets = event.selected;
this.updateSelection({ targets });
if (event.isDragStart) {
event.inputEvent.preventDefault();
setTimeout(() => {
this.moveable!.dragStart(event.inputEvent);
});
}
// @TODO Figure out click-drag functionality without phantom mouseup issue
// https://github.com/daybrush/moveable/issues/481
// if (event.isDragStart) {
// event.inputEvent.preventDefault();
// setTimeout(() => {
// this.moveable!.dragStart(event.inputEvent);
// });
// }
});
};

Loading…
Cancel
Save