Set pointerEvents style programmatically instead of relying on ol.css

This commit is contained in:
Andreas Hocevar
2020-04-16 17:34:40 +02:00
parent 12043e147c
commit 7f6258dd0d
14 changed files with 27 additions and 22 deletions

View File

@@ -83,6 +83,17 @@ class Control extends BaseObject {
}
}
/**
* Creates the element for this control and sets it on the instance.
* @return {HTMLDivElement} Element for this control.
*/
createElement() {
const element = document.createElement('div');
element.style.pointerEvents = 'auto';
this.element = element;
return element;
}
/**
* Clean up.
*/