diff options
author | Robert Jaros <rjaros@finn.pl> | 2020-02-26 23:12:48 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2020-02-26 23:12:48 +0100 |
commit | 450d3d259cd3253f7cda8ab4baffb0a6d070d596 (patch) | |
tree | 25ff42e5e9e7d683ce5395fdd7159ed85244b1a3 /src/main/kotlin/pl/treksoft/kvision/panel | |
parent | 94f36f212a60654571728a1f34701d95453efc22 (diff) | |
download | kvision-450d3d259cd3253f7cda8ab4baffb0a6d070d596.tar.gz kvision-450d3d259cd3253f7cda8ab4baffb0a6d070d596.tar.bz2 kvision-450d3d259cd3253f7cda8ab4baffb0a6d070d596.zip |
Major changes in the event handling architecture. Support for multiple event handlers.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/Root.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt index 4b02db5a..b1bb36a8 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/Root.kt @@ -29,7 +29,6 @@ import pl.treksoft.kvision.KVManager import pl.treksoft.kvision.core.StringBoolPair import pl.treksoft.kvision.core.Style import pl.treksoft.kvision.core.Widget -import pl.treksoft.kvision.core.onEvent import pl.treksoft.kvision.utils.snClasses import pl.treksoft.kvision.utils.snOpt import kotlin.browser.document @@ -104,7 +103,7 @@ class Root : SimplePanel { fun addContextMenu(contextMenu: Widget) { contextMenus.add(contextMenu) contextMenu.parent = this - this.onEvent { + this.setInternalEventListener<Root> { click = { e -> @Suppress("UnsafeCastFromDynamic") if (!e.asDynamic().dropDownCM) contextMenu.hide() |