aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/snabbdom
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-11-04 12:47:52 +0100
committerRobert Jaros <rjaros@finn.pl>2017-11-04 12:47:52 +0100
commit1a41c5d06bb51907b752afa9c13c08dd1e82455a (patch)
tree40dd4c1f4c75ab38f9d4a9de062e221e14da239c /src/main/kotlin/pl/treksoft/kvision/snabbdom
parent9a1be3609acc08349387013430f395b9426c23a0 (diff)
downloadkvision-1a41c5d06bb51907b752afa9c13c08dd1e82455a.tar.gz
kvision-1a41c5d06bb51907b752afa9c13c08dd1e82455a.tar.bz2
kvision-1a41c5d06bb51907b752afa9c13c08dd1e82455a.zip
Refactoring events handling
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/snabbdom')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt b/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt
index f1a79a76..ecd3316e 100644
--- a/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/snabbdom/Types.kt
@@ -21,9 +21,13 @@ fun obj(init: dynamic.() -> Unit): dynamic {
@Suppress("UnsafeCastFromDynamic")
private fun vNodeData(): VNodeData = js("({})")
+interface KvJQueryEventObject : JQueryEventObject {
+ val clickedIndex: Int
+}
+
@Suppress("UnsafeCastFromDynamic")
class KvEvent(type: String, eventInitDict: CustomEventInit) : CustomEvent(type, eventInitDict) {
- override val detail: JQueryEventObject = obj({})
+ override val detail: KvJQueryEventObject = obj({})
}
interface BtOn : On {
@@ -37,6 +41,14 @@ interface BtOn : On {
var hiddenBsModal: ((KvEvent) -> kotlin.Unit)?
var dragSplitPanel: ((KvEvent) -> kotlin.Unit)?
var dragEndSplitPanel: ((KvEvent) -> kotlin.Unit)?
+ var showBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var shownBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var hideBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var hiddenBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var loadedBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var renderedBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var refreshedBsSelect: ((KvEvent) -> kotlin.Unit)?
+ var changedBsSelect: ((KvEvent) -> kotlin.Unit)?
}
interface SnOn<T> : BtOn {