@babylonjs/gui-editor 5.14.0 → 5.14.1
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.
@@ -49729,7 +49729,12 @@ class HexColor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
49729
49729
|
}
|
49730
49730
|
this.setState({ hex: valueString });
|
49731
49731
|
if (valueString.length !== this.props.expectedLength) {
|
49732
|
-
|
49732
|
+
if (this.props.expectedLength === 8 && valueString.length === 6) {
|
49733
|
+
valueString = valueString + "FF";
|
49734
|
+
}
|
49735
|
+
else {
|
49736
|
+
return;
|
49737
|
+
}
|
49733
49738
|
}
|
49734
49739
|
this.props.onChange("#" + valueString);
|
49735
49740
|
}
|
@@ -50902,7 +50907,7 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
50902
50907
|
}
|
50903
50908
|
return 0;
|
50904
50909
|
}
|
50905
|
-
updateValue(value) {
|
50910
|
+
updateValue(value, valueToValidate) {
|
50906
50911
|
if (this.props.numbersOnly) {
|
50907
50912
|
if (/[^0-9.\p\x%-]/g.test(value)) {
|
50908
50913
|
return;
|
@@ -50930,8 +50935,8 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
50930
50935
|
}
|
50931
50936
|
this._localChange = true;
|
50932
50937
|
const store = this.props.value !== undefined ? this.props.value : this.props.target[this.props.propertyName];
|
50933
|
-
if (this.props.validator) {
|
50934
|
-
if (this.props.validator(
|
50938
|
+
if (this.props.validator && valueToValidate) {
|
50939
|
+
if (this.props.validator(valueToValidate) == false) {
|
50935
50940
|
value = store;
|
50936
50941
|
}
|
50937
50942
|
}
|
@@ -50978,15 +50983,15 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
50978
50983
|
}
|
50979
50984
|
this.updateValue(this.state.value);
|
50980
50985
|
}, onBlur: (evt) => {
|
50981
|
-
this.updateValue(evt.target.value);
|
50986
|
+
this.updateValue(evt.target.value, evt.target.value);
|
50982
50987
|
if (this.props.lockObject) {
|
50983
50988
|
this.props.lockObject.lock = false;
|
50984
50989
|
}
|
50985
|
-
} }) })), !this.props.multilines && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: `value${this.props.noUnderline === true ? " noUnderline" : ""}${this.props.arrows ? " hasArrows" : ""}${this.state.dragging ? " dragging" : ""}` }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { value: value, onBlur: () => {
|
50990
|
+
} }) })), !this.props.multilines && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: `value${this.props.noUnderline === true ? " noUnderline" : ""}${this.props.arrows ? " hasArrows" : ""}${this.state.dragging ? " dragging" : ""}` }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { value: value, onBlur: (evt) => {
|
50986
50991
|
if (this.props.lockObject) {
|
50987
50992
|
this.props.lockObject.lock = false;
|
50988
50993
|
}
|
50989
|
-
this.updateValue((this.props.value !== undefined ? this.props.value : this.props.target[this.props.propertyName]) || "");
|
50994
|
+
this.updateValue((this.props.value !== undefined ? this.props.value : this.props.target[this.props.propertyName]) || "", evt.target.value);
|
50990
50995
|
}, onFocus: () => {
|
50991
50996
|
if (this.props.lockObject) {
|
50992
50997
|
this.props.lockObject.lock = true;
|