aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/utils
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-25 01:04:24 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-25 01:04:24 +0100
commit9a1effcf29b27cc2e60b927c2d737b6cad0289b7 (patch)
treecd47309106493f869a7d7d5e9a43dcc99969dd4c /src/main/kotlin/pl/treksoft/kvision/utils
parentc64b2c4b1f0c4e0e0d94d202715db4aaa47d9c65 (diff)
downloadkvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.tar.gz
kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.tar.bz2
kvision-9a1effcf29b27cc2e60b927c2d737b6cad0289b7.zip
Change enum classes names for better readability.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/utils')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt b/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt
index 335e0415..ec7c4961 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"