@xviewer.js/debug 1.0.0-alpha.34 → 1.0.0-alpha.35
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/module.js
CHANGED
|
@@ -449,14 +449,14 @@ class NumberController extends Controller {
|
|
|
449
449
|
return false;
|
|
450
450
|
}
|
|
451
451
|
updateDisplay() {
|
|
452
|
-
const value = this.getValue();
|
|
452
|
+
const value = this._snap(this.getValue());
|
|
453
453
|
if (this._hasSlider) {
|
|
454
454
|
let percent = (value - this._min) / (this._max - this._min);
|
|
455
455
|
percent = Math.max(0, Math.min(percent, 1));
|
|
456
456
|
this.$fill.style.width = percent * 100 + '%';
|
|
457
457
|
}
|
|
458
458
|
if (!this._inputFocused) {
|
|
459
|
-
this.$input.value = value;
|
|
459
|
+
this.$input.value = "" + value;
|
|
460
460
|
}
|
|
461
461
|
return this;
|
|
462
462
|
}
|
|
@@ -1059,8 +1059,8 @@ class UINumber extends UIElement {
|
|
|
1059
1059
|
return this;
|
|
1060
1060
|
}
|
|
1061
1061
|
updateDisplay() {
|
|
1062
|
-
let value = this.getValue();
|
|
1063
|
-
this.dom.value = "" +
|
|
1062
|
+
let value = this._snap(this.getValue());
|
|
1063
|
+
this.dom.value = "" + value;
|
|
1064
1064
|
if (this.unit !== '') this.dom.value += ' ' + this.unit;
|
|
1065
1065
|
}
|
|
1066
1066
|
_getImplicitStep(value) {
|