mirror of
https://github.com/LucasDower/ObjToSchematic.git
synced 2024-12-15 02:59:55 +08:00
Fixed slider value not matching display value
This commit is contained in:
parent
4a62cd5e4c
commit
4d89696f5c
@ -154,7 +154,7 @@ export class AppContext {
|
|||||||
|
|
||||||
const uiElements = this._ui.layout.build.elements;
|
const uiElements = this._ui.layout.build.elements;
|
||||||
const voxelMeshParams: VoxelMeshParams = {
|
const voxelMeshParams: VoxelMeshParams = {
|
||||||
desiredHeight: uiElements.height.getCachedValue() as number,
|
desiredHeight: uiElements.height.getDisplayValue(),
|
||||||
useMultisampleColouring: uiElements.multisampleColouring.getCachedValue() === 'on',
|
useMultisampleColouring: uiElements.multisampleColouring.getCachedValue() === 'on',
|
||||||
textureFiltering: uiElements.textureFiltering.getCachedValue() === 'linear' ? TextureFiltering.Linear : TextureFiltering.Nearest,
|
textureFiltering: uiElements.textureFiltering.getCachedValue() === 'linear' ? TextureFiltering.Linear : TextureFiltering.Nearest,
|
||||||
enableAmbientOcclusion: uiElements.ambientOcclusion.getCachedValue() === 'on',
|
enableAmbientOcclusion: uiElements.ambientOcclusion.getCachedValue() === 'on',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { HashMap } from './hash_map';
|
import { HashMap } from './hash_map';
|
||||||
import { UV, RGB, ASSERT, fileExists, ColourSpace, ATLASES_DIR, PALETTES_DIR, AppError, LOG_WARN, LOG } from './util';
|
import { UV, RGB, ASSERT, fileExists, ColourSpace, ATLASES_DIR, PALETTES_DIR, AppError, LOG_WARN } from './util';
|
||||||
import { Vector3 } from './vector';
|
import { Vector3 } from './vector';
|
||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
@ -126,6 +126,10 @@ export class SliderElement extends LabelledElement<number> {
|
|||||||
elementValue.innerHTML = this.getValue().toFixed(this._decimals);
|
elementValue.innerHTML = this.getValue().toFixed(this._decimals);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getDisplayValue() {
|
||||||
|
return parseFloat(this.getValue().toFixed(this._decimals));
|
||||||
|
}
|
||||||
|
|
||||||
protected _onEnabledChanged() {
|
protected _onEnabledChanged() {
|
||||||
super._onEnabledChanged();
|
super._onEnabledChanged();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user