@babylonjs/gui-editor 6.16.0 → 6.16.2

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.
@@ -38319,6 +38319,9 @@ class HexColor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
38319
38319
  if (this.props.expectedLength === 8 && valueString.length === 6) {
38320
38320
  valueString = valueString + "FF";
38321
38321
  }
38322
+ else if (this.props.expectedLength === 6 && valueString.length === 8) {
38323
+ valueString = valueString.substring(0, 6);
38324
+ }
38322
38325
  else {
38323
38326
  return;
38324
38327
  }
@@ -38987,22 +38990,22 @@ class FloatLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
38987
38990
  super(props);
38988
38991
  this._localChange = false;
38989
38992
  const currentValue = this.props.target[this.props.propertyName];
38990
- this.state = { value: this.getValueString(currentValue), dragging: false };
38993
+ this.state = { value: this.getValueString(currentValue, this.props), dragging: false };
38991
38994
  this._store = currentValue;
38992
38995
  }
38993
38996
  componentWillUnmount() {
38994
38997
  this.unlock();
38995
38998
  }
38996
- getValueString(value) {
38999
+ getValueString(value, props) {
38997
39000
  if (value) {
38998
39001
  if (value === _targetsProxy__WEBPACK_IMPORTED_MODULE_4__.conflictingValuesPlaceholder) {
38999
39002
  return _targetsProxy__WEBPACK_IMPORTED_MODULE_4__.conflictingValuesPlaceholder;
39000
39003
  }
39001
- else if (this.props.isInteger) {
39004
+ else if (props.isInteger) {
39002
39005
  return value.toFixed(0);
39003
39006
  }
39004
39007
  else {
39005
- return value.toFixed(this.props.digits || 4);
39008
+ return value.toFixed(props.digits || 4);
39006
39009
  }
39007
39010
  }
39008
39011
  return "0";
@@ -39013,12 +39016,12 @@ class FloatLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
39013
39016
  return true;
39014
39017
  }
39015
39018
  const newValue = nextProps.target[nextProps.propertyName];
39016
- const newValueString = this.getValueString(newValue);
39019
+ const newValueString = this.getValueString(newValue, nextProps);
39017
39020
  if (newValueString !== nextState.value) {
39018
39021
  nextState.value = newValueString;
39019
39022
  return true;
39020
39023
  }
39021
- if (nextState.dragging != this.state.dragging || nextProps.unit !== this.props.unit) {
39024
+ if (nextState.dragging != this.state.dragging || nextProps.unit !== this.props.unit || nextProps.isInteger !== this.props.isInteger) {
39022
39025
  return true;
39023
39026
  }
39024
39027
  return false;