aboutsummaryrefslogtreecommitdiff
path: root/featureClass
diff options
context:
space:
mode:
Diffstat (limited to 'featureClass')
-rw-r--r--featureClass/class.js9
-rw-r--r--featureClass/featureManager.js1
2 files changed, 8 insertions, 2 deletions
diff --git a/featureClass/class.js b/featureClass/class.js
index dc0ca27..22614b1 100644
--- a/featureClass/class.js
+++ b/featureClass/class.js
@@ -211,14 +211,19 @@ class Event {
if (this.enabled) return
this.enabled = true
- this.actuallyRegister()
+
+ delay(0, () => {
+ this.actuallyRegister()
+ })
}
unregister() {
if (!this.enabled) return
this.enabled = false
- this.actuallyUnregister()
+ delay(0, () => {
+ this.actuallyUnregister()
+ })
}
actuallyRegister() { }
diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js
index 9da76c7..0f0edeb 100644
--- a/featureClass/featureManager.js
+++ b/featureClass/featureManager.js
@@ -414,6 +414,7 @@ class FeatureManager {
// }
// })
// }else{
+
this.eventObjects[event] = register(event, (...args) => {
// let start = Date.now()
this.triggerEvent(event, args)