aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Types.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt34
3 files changed, 20 insertions, 20 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Types.kt b/src/main/kotlin/pl/treksoft/kvision/core/Types.kt
index ef7abf06..0817b3ae 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Types.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Types.kt
@@ -41,4 +41,4 @@ typealias StringBoolPair = Pair<String, Boolean>
/**
* This type is used for defining CSS dimensions (width, heights, margins, paddings, etc.).
*/
-typealias CssSize = Pair<Int, Unit>
+typealias CssSize = Pair<Int, UNIT>
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
index 423b1cde..3c7acbe5 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/SplitPanel.kt
@@ -26,7 +26,7 @@ import pl.treksoft.jquery.JQuery
import pl.treksoft.jquery.JQueryEventObject
import pl.treksoft.kvision.core.Container
import pl.treksoft.kvision.core.StyledComponent
-import pl.treksoft.kvision.core.Unit
+import pl.treksoft.kvision.core.UNIT
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
import pl.treksoft.kvision.utils.obj
@@ -67,7 +67,7 @@ open class SplitPanel(
internal fun afterInsertSplitter() {
if (children.size == 2) {
val horizontal = direction == Direction.HORIZONTAL
- val px = Unit.px
+ val px = UNIT.px
val self = this
children[0].getElementJQueryD().resizable(obj {
handleSelector = "#" + splitter.id
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt
index ec7c4961..335e0415 100644
--- a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt
@@ -25,7 +25,7 @@ package pl.treksoft.kvision.utils
import pl.treksoft.kvision.KVManager
import pl.treksoft.kvision.core.CssSize
-import pl.treksoft.kvision.core.Unit
+import pl.treksoft.kvision.core.UNIT
import kotlin.js.Date
/**
@@ -33,7 +33,7 @@ import kotlin.js.Date
*/
val Int.px: CssSize
get() {
- return Pair(this, Unit.px)
+ return Pair(this, UNIT.px)
}
/**
@@ -41,7 +41,7 @@ val Int.px: CssSize
*/
val Int.em: CssSize
get() {
- return Pair(this, Unit.em)
+ return Pair(this, UNIT.em)
}
/**
@@ -49,7 +49,7 @@ val Int.em: CssSize
*/
val Int.pt: CssSize
get() {
- return Pair(this, Unit.pt)
+ return Pair(this, UNIT.pt)
}
/**
@@ -57,7 +57,7 @@ val Int.pt: CssSize
*/
val Int.perc: CssSize
get() {
- return Pair(this, Unit.perc)
+ return Pair(this, UNIT.perc)
}
/**
@@ -65,7 +65,7 @@ val Int.perc: CssSize
*/
val Int.rem: CssSize
get() {
- return Pair(this, Unit.rem)
+ return Pair(this, UNIT.rem)
}
/**
@@ -73,7 +73,7 @@ val Int.rem: CssSize
*/
val Int.ch: CssSize
get() {
- return Pair(this, Unit.ch)
+ return Pair(this, UNIT.ch)
}
/**
@@ -81,7 +81,7 @@ val Int.ch: CssSize
*/
val Int.cm: CssSize
get() {
- return Pair(this, Unit.cm)
+ return Pair(this, UNIT.cm)
}
/**
@@ -89,7 +89,7 @@ val Int.cm: CssSize
*/
val Int.mm: CssSize
get() {
- return Pair(this, Unit.mm)
+ return Pair(this, UNIT.mm)
}
/**
@@ -98,7 +98,7 @@ val Int.mm: CssSize
@Suppress("FunctionNaming")
val Int.`in`: CssSize
get() {
- return Pair(this, Unit.`in`)
+ return Pair(this, UNIT.`in`)
}
/**
@@ -106,7 +106,7 @@ val Int.`in`: CssSize
*/
val Int.pc: CssSize
get() {
- return Pair(this, Unit.pc)
+ return Pair(this, UNIT.pc)
}
/**
@@ -114,7 +114,7 @@ val Int.pc: CssSize
*/
val Int.vh: CssSize
get() {
- return Pair(this, Unit.vh)
+ return Pair(this, UNIT.vh)
}
/**
@@ -122,7 +122,7 @@ val Int.vh: CssSize
*/
val Int.vw: CssSize
get() {
- return Pair(this, Unit.vw)
+ return Pair(this, UNIT.vw)
}
/**
@@ -130,7 +130,7 @@ val Int.vw: CssSize
*/
val Int.vmin: CssSize
get() {
- return Pair(this, Unit.vmin)
+ return Pair(this, UNIT.vmin)
}
/**
@@ -138,19 +138,19 @@ val Int.vmin: CssSize
*/
val Int.vmax: CssSize
get() {
- return Pair(this, Unit.vmax)
+ return Pair(this, UNIT.vmax)
}
/**
* Helper property to describe CSS auto value.
*/
-val auto: CssSize = Pair(0, Unit.auto)
+val auto: CssSize = Pair(0, UNIT.auto)
/**
* Extension function to convert CssSize to String.
*/
fun CssSize.asString(): String {
- return if (this.second != Unit.auto) {
+ return if (this.second != UNIT.auto) {
this.first.toString() + this.second.unit
} else {
"auto"