Skip to content
Snippets Groups Projects
Commit 148f82a8 authored by rhenck's avatar rhenck
Browse files

[editor] Make all elements unclickable, only the overlay

- This helps getting rid of annoying element interaction and solves some
  selection issues (for example double clicking text elements to bring
  up the editor). While creating units, the placement and properties of
  the elements are important and not interacting with the elements.
  This is what the preview/player is for.
- This may also help with detecting selection for the Delete-key logic.
parent 59e7a0c0
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,9 @@ export abstract class CanvasElementOverlay implements OnInit, OnDestroy {
this.childComponent = this.elementContainer.createComponent(componentFactory);
this.childComponent.instance.elementModel = this.element;
// Make children not clickable. This way the only relevant events are managed by the overlay.
this.childComponent.location.nativeElement.style.pointerEvents = 'none';
this.selectionService.selectElement({ componentElement: this, multiSelect: false });
if (this.childComponent.instance instanceof FormElementComponent) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment