@@ -167,10 +167,8 @@ class Slider : Element(ElementType("slider")) {
|
||||
if (it.key == KEY_ENTER) {
|
||||
try {
|
||||
val number = NumberFormat.getInstance().parse(keyboardInput).toDouble()
|
||||
if (number != null) {
|
||||
interactiveValue = number.coerceIn(range.min, range.max)
|
||||
}
|
||||
} catch (e : ParseException) {
|
||||
interactiveValue = number.coerceIn(range.min, range.max)
|
||||
} catch (e: ParseException) {
|
||||
// -- silently (but safely) ignore the exception
|
||||
}
|
||||
keyboardInput = ""
|
||||
|
||||
@@ -81,9 +81,6 @@ abstract class TextElement(et: ElementType) : Element(et) {
|
||||
}
|
||||
|
||||
fun TextElement.bind(property: KMutableProperty0<String>) {
|
||||
var currentValue: Double? = null
|
||||
|
||||
|
||||
if (root() as? Body == null) {
|
||||
throw RuntimeException("no body")
|
||||
}
|
||||
|
||||
@@ -48,6 +48,9 @@ class Matcher {
|
||||
Combinator.LATER_SIBLING -> if (result == MatchingResult.RESTART_FROM_CLOSEST_DESCENDANT) {
|
||||
return result
|
||||
}
|
||||
Combinator.DESCENDANT -> {
|
||||
// intentionally do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user