Simplify events and store listeners only in one place

This commit is contained in:
ahocevar
2019-09-04 16:39:32 +02:00
parent d416866108
commit ebfb20440a
52 changed files with 224 additions and 599 deletions

View File

@@ -188,12 +188,13 @@ class DragAndDrop extends Interaction {
* @inheritDoc
*/
setActive(active) {
super.setActive(active);
if (active) {
if (!this.getActive() && active) {
this.registerListeners_();
} else {
}
if (this.getActive() && !active) {
this.unregisterListeners_();
}
super.setActive(active);
}
/**