diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-10-13 03:37:40 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-10-13 03:37:40 +0200 |
commit | ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c (patch) | |
tree | 7cac3c5449eb8aa398b279d62d9a67ed34fa4115 /kvision-modules/kvision-spinner/src/main/kotlin/pl | |
parent | 470953c78c2509224bb452c16f8bbea54e53b3d7 (diff) | |
download | kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.tar.gz kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.tar.bz2 kvision-ebce2c4b839c0b2f8be78bc31c1ce12c45a0164c.zip |
Major refactoring of the multi-platform components.
Dependencies upgrade.
A lot of code style fixes.
Diffstat (limited to 'kvision-modules/kvision-spinner/src/main/kotlin/pl')
2 files changed, 15 insertions, 15 deletions
diff --git a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt index 0de06c8c..ca4d3764 100644 --- a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt +++ b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/KVManagerSpinner.kt @@ -21,7 +21,7 @@ */ package pl.treksoft.kvision -internal val KVManagerSpinnerInit = KVManagerSpinner.init() +internal val kVManagerSpinnerInit = KVManagerSpinner.init() /** * Internal singleton object which initializes and configures KVision spinner module. diff --git a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt index 7d3af684..b4a8138a 100644 --- a/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt +++ b/kvision-modules/kvision-spinner/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt @@ -98,38 +98,38 @@ open class SpinnerInput( /** * Spinner value. */ - var value by refreshOnUpdate(value, { refreshState() }) + var value by refreshOnUpdate(value) { refreshState() } /** * The value attribute of the generated HTML input element. * * This value is placed directly in generated HTML code, while the [value] property is dynamically * bound to the spinner input value. */ - var startValue by refreshOnUpdate(value, { this.value = it; refresh() }) + var startValue by refreshOnUpdate(value) { this.value = it; refresh() } /** * Minimal value. */ - var min by refreshOnUpdate(min, { refreshSpinner() }) + var min by refreshOnUpdate(min) { refreshSpinner() } /** * Maximal value. */ - var max by refreshOnUpdate(max, { refreshSpinner() }) + var max by refreshOnUpdate(max) { refreshSpinner() } /** * Step value. */ - var step by refreshOnUpdate(step, { refreshSpinner() }) + var step by refreshOnUpdate(step) { refreshSpinner() } /** * Number of decimal digits value. */ - var decimals by refreshOnUpdate(decimals, { refreshSpinner() }) + var decimals by refreshOnUpdate(decimals) { refreshSpinner() } /** * Spinner buttons type. */ - var buttonsType by refreshOnUpdate(buttonsType, { refreshSpinner() }) + var buttonsType by refreshOnUpdate(buttonsType) { refreshSpinner() } /** * Spinner force rounding type. */ - var forceType by refreshOnUpdate(forceType, { refreshSpinner() }) + var forceType by refreshOnUpdate(forceType) { refreshSpinner() } /** * The placeholder for the spinner input. */ @@ -217,18 +217,18 @@ open class SpinnerInput( size?.let { siblings?.find("button")?.addClass(it.className) } - this.getElementJQuery()?.on("change", { e, _ -> + this.getElementJQuery()?.on("change") { e, _ -> if (e.asDynamic().isTrigger != null) { val event = org.w3c.dom.events.Event("change") this.getElement()?.dispatchEvent(event) } - }) - this.getElementJQuery()?.on("touchspin.on.min", { e, _ -> + } + this.getElementJQuery()?.on("touchspin.on.min") { e, _ -> this.dispatchEvent("onMinBsSpinner", obj { detail = e }) - }) - this.getElementJQuery()?.on("touchspin.on.max", { e, _ -> + } + this.getElementJQuery()?.on("touchspin.on.max") { e, _ -> this.dispatchEvent("onMaxBsSpinner", obj { detail = e }) - }) + } refreshState() } |