Show More
@@ -78,9 +78,11 b' class _BoundedFloatRangeWidget(_FloatRangeWidget):' | |||
|
78 | 78 | """Validate min <= low <= high <= max""" |
|
79 | 79 | if name == "value": |
|
80 | 80 | low, high = new |
|
81 | low = max(low, self.min) | |
|
82 |
high = |
|
|
83 | self.value = (min(low, high), max(low, high)) | |
|
81 | else: | |
|
82 | low, high = self.value | |
|
83 | low = max(low, self.min) | |
|
84 | high = min(high, self.max) | |
|
85 | self.value = (min(low, high), max(low, high)) | |
|
84 | 86 | |
|
85 | 87 | |
|
86 | 88 | class FloatRangeSliderWidget(_BoundedFloatRangeWidget): |
@@ -77,9 +77,11 b' class _BoundedIntRangeWidget(_IntRangeWidget):' | |||
|
77 | 77 | """Validate min <= low <= high <= max""" |
|
78 | 78 | if name == "value": |
|
79 | 79 | low, high = new |
|
80 | low = max(low, self.min) | |
|
81 |
high = |
|
|
82 | self.value = (min(low, high), max(low, high)) | |
|
80 | else: | |
|
81 | low, high = self.value | |
|
82 | low = max(low, self.min) | |
|
83 | high = min(high, self.max) | |
|
84 | self.value = (min(low, high), max(low, high)) | |
|
83 | 85 | |
|
84 | 86 | |
|
85 | 87 | class IntRangeSliderWidget(_BoundedIntRangeWidget): |
General Comments 0
You need to be logged in to leave comments.
Login now