aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-07-13 01:22:56 +0200
committerRobert Jaros <rjaros@finn.pl>2019-07-13 01:22:56 +0200
commit426da03b5a4e2d715c086e1bfd92b34358ae17ee (patch)
treec842225bf95ee06399cbc9caf546d467f24246cf /src/main/kotlin
parentba5c00b6992d28cfb6afc7fab108c9009f9e1b7c (diff)
downloadkvision-426da03b5a4e2d715c086e1bfd92b34358ae17ee.tar.gz
kvision-426da03b5a4e2d715c086e1bfd92b34358ae17ee.tar.bz2
kvision-426da03b5a4e2d715c086e1bfd92b34358ae17ee.zip
Style fixes. Suppress style warnings.
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt b/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt
index c929bea9..0f921f42 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/PopupOptions.kt
@@ -62,7 +62,7 @@ data class TooltipOptions(
* @return JSON object
*/
fun TooltipOptions.toJs(): dynamic {
- val trigger = this.triggers?.map { it.trigger }?.joinToString(" ")
+ val trigger = this.triggers?.joinToString(" ") { it.trigger }
return obj {
if (this@toJs.title != null) this.title = this@toJs.title
if (this@toJs.rich != null) this.html = this@toJs.rich
@@ -93,7 +93,7 @@ data class PopoverOptions(
* @return JSON object
*/
fun PopoverOptions.toJs(): dynamic {
- val trigger = this.triggers?.map { it.trigger }?.joinToString(" ")
+ val trigger = this.triggers?.joinToString(" ") { it.trigger }
return obj {
if (this@toJs.content != null) this.content = this@toJs.content
if (this@toJs.title != null) this.title = this@toJs.title
diff --git a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
index 5f911539..7f120f73 100644
--- a/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/modal/Modal.kt
@@ -128,6 +128,7 @@ open class Modal(
content.add(header)
content.add(body)
content.add(footer)
+ @Suppress("LeakingThis")
modals.add(this)
@Suppress("LeakingThis")
init?.invoke(this)
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
index ae8360b5..f620f2b0 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
@@ -160,6 +160,7 @@ open class TabPanel(
click = { e ->
val actIndex = this@TabPanel.content.children.indexOf(childrenMap[currentIndex])
e.asDynamic().data = actIndex
+ @Suppress("UnsafeCastFromDynamic")
if (this@TabPanel.dispatchEvent(
"tabClosing",
obj { detail = e; cancelable = true }) != false