Fix layer toggling

This commit is contained in:
Pieter Vander Vennet 2020-07-22 12:17:06 +02:00
parent e2ae83536e
commit 662b752a39
4 changed files with 10 additions and 14 deletions

View file

@ -53,8 +53,12 @@ export abstract class UIElement {
if (this._onClick !== undefined) {
const self = this;
element.onclick = () => {
element.onclick = (e) => {
if(e.consumed){
return;
}
self._onClick();
e.consumed = true;
}
element.style.pointerEvents = "all";
element.style.cursor = "pointer";