@xviewer.js/debug 1.0.0-alpha.34 → 1.0.0-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +4 -4
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -4
- package/dist/module.js.map +1 -1
- package/package.json +2 -2
- package/types/gui/controllers/NumberController.d.ts +1 -1
package/dist/main.js
CHANGED
|
@@ -451,14 +451,14 @@ class NumberController extends Controller {
|
|
|
451
451
|
return false;
|
|
452
452
|
}
|
|
453
453
|
updateDisplay() {
|
|
454
|
-
const value = this.getValue();
|
|
454
|
+
const value = this._snap(this.getValue());
|
|
455
455
|
if (this._hasSlider) {
|
|
456
456
|
let percent = (value - this._min) / (this._max - this._min);
|
|
457
457
|
percent = Math.max(0, Math.min(percent, 1));
|
|
458
458
|
this.$fill.style.width = percent * 100 + '%';
|
|
459
459
|
}
|
|
460
460
|
if (!this._inputFocused) {
|
|
461
|
-
this.$input.value = value;
|
|
461
|
+
this.$input.value = "" + value;
|
|
462
462
|
}
|
|
463
463
|
return this;
|
|
464
464
|
}
|
|
@@ -1061,8 +1061,8 @@ class UINumber extends UIElement {
|
|
|
1061
1061
|
return this;
|
|
1062
1062
|
}
|
|
1063
1063
|
updateDisplay() {
|
|
1064
|
-
let value = this.getValue();
|
|
1065
|
-
this.dom.value = "" +
|
|
1064
|
+
let value = this._snap(this.getValue());
|
|
1065
|
+
this.dom.value = "" + value;
|
|
1066
1066
|
if (this.unit !== '') this.dom.value += ' ' + this.unit;
|
|
1067
1067
|
}
|
|
1068
1068
|
_getImplicitStep(value) {
|