@babylonjs/inspector 5.24.0 → 5.25.0
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.
@@ -69177,7 +69177,7 @@ void main(void)
|
|
69177
69177
|
}
|
69178
69178
|
}`;
|
69179
69179
|
core_Materials_effect__WEBPACK_IMPORTED_MODULE_0__.Effect.ShadersStore[name] = shader;
|
69180
|
-
/** @
|
69180
|
+
/** @internal */
|
69181
69181
|
// eslint-disable-next-line no-var
|
69182
69182
|
var lodPixelShader = { name, shader };
|
69183
69183
|
|
@@ -69234,7 +69234,7 @@ void main(void)
|
|
69234
69234
|
}
|
69235
69235
|
}`;
|
69236
69236
|
core_Materials_effect__WEBPACK_IMPORTED_MODULE_0__.Effect.ShadersStore[name] = shader;
|
69237
|
-
/** @
|
69237
|
+
/** @internal */
|
69238
69238
|
// eslint-disable-next-line no-var
|
69239
69239
|
var lodCubePixelShader = { name, shader };
|
69240
69240
|
|
@@ -70980,7 +70980,7 @@ class OptionsLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
70980
70980
|
constructor(props) {
|
70981
70981
|
super(props);
|
70982
70982
|
this._localChange = false;
|
70983
|
-
this.state = { value: this._remapValueIn(this._getValue(props)) };
|
70983
|
+
this.state = { value: this._remapValueIn(this._getValue(props)), addCustom: false };
|
70984
70984
|
}
|
70985
70985
|
_remapValueIn(value) {
|
70986
70986
|
return this.props.allowNullValue && value === null ? Null_Value : value;
|
@@ -70999,11 +70999,14 @@ class OptionsLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
70999
70999
|
this._localChange = false;
|
71000
71000
|
return true;
|
71001
71001
|
}
|
71002
|
-
const newValue = this._remapValueIn(nextProps.extractValue ? nextProps.extractValue(
|
71002
|
+
const newValue = this._remapValueIn(nextProps.extractValue ? nextProps.extractValue(nextProps.target) : nextProps.target[nextProps.propertyName]);
|
71003
71003
|
if (newValue != null && newValue !== nextState.value) {
|
71004
71004
|
nextState.value = newValue;
|
71005
71005
|
return true;
|
71006
71006
|
}
|
71007
|
+
if (this.props.options !== nextProps.options) {
|
71008
|
+
return true;
|
71009
|
+
}
|
71007
71010
|
return false;
|
71008
71011
|
}
|
71009
71012
|
raiseOnPropertyChanged(newValue, previousValue) {
|
@@ -71022,23 +71025,64 @@ class OptionsLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
71022
71025
|
this.setState({ value: value });
|
71023
71026
|
}
|
71024
71027
|
updateValue(valueString) {
|
71025
|
-
|
71028
|
+
let value = this.props.valuesAreStrings ? valueString : parseInt(valueString);
|
71029
|
+
if (isNaN(Number(value))) {
|
71030
|
+
for (let i = 0; i < this.props.options.length; i++) {
|
71031
|
+
if (this.props.options.at(i)?.label === valueString) {
|
71032
|
+
value = Number(this.props.options.at(i)?.value);
|
71033
|
+
}
|
71034
|
+
}
|
71035
|
+
}
|
71036
|
+
if (value === 0 && this.props.fromFontDropdown) {
|
71037
|
+
this.setState({ addCustom: true });
|
71038
|
+
}
|
71026
71039
|
this._localChange = true;
|
71027
71040
|
const store = this.props.extractValue ? this.props.extractValue(this.props.target) : this.props.target[this.props.propertyName];
|
71028
71041
|
if (!this.props.noDirectUpdate) {
|
71029
71042
|
this.props.target[this.props.propertyName] = this._remapValueOut(value);
|
71030
71043
|
}
|
71031
|
-
|
71032
|
-
if (this.props.
|
71033
|
-
this.
|
71044
|
+
//selecting a regular option from font dropdown
|
71045
|
+
if (value != 0 && this.props.fromFontDropdown) {
|
71046
|
+
this.setState({ value: value });
|
71047
|
+
if (this.props.onSelect) {
|
71048
|
+
this.props.onSelect(value);
|
71049
|
+
}
|
71050
|
+
//selecting 'custom font' from font dropdown
|
71051
|
+
}
|
71052
|
+
else if (this.props.fromFontDropdown) {
|
71053
|
+
if (this.props.onSelect) {
|
71054
|
+
this.props.onSelect(this.state.value);
|
71055
|
+
}
|
71056
|
+
}
|
71057
|
+
//selecting from a dropdown that's not font dropdown
|
71058
|
+
else {
|
71059
|
+
this.setState({ value: value });
|
71060
|
+
if (this.props.onSelect) {
|
71061
|
+
this.props.onSelect(value);
|
71062
|
+
}
|
71034
71063
|
}
|
71035
71064
|
const newValue = this.props.extractValue ? this.props.extractValue(this.props.target) : this.props.target[this.props.propertyName];
|
71036
71065
|
this.raiseOnPropertyChanged(newValue, store);
|
71037
71066
|
}
|
71067
|
+
updateCustomValue() {
|
71068
|
+
this.setState({ addCustom: false });
|
71069
|
+
}
|
71038
71070
|
render() {
|
71039
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className:
|
71071
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: `listLine ${this.props.className ?? ""}`, children: [this.props.icon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, color: "black", className: "icon" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "label", title: this.props.label, children: this.props.label }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "options", children: this.state.addCustom ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "text", placeholder: "Enter a custom font here", onKeyDown: (event) => {
|
71072
|
+
event.key === "Enter" && this.props.addVal != undefined
|
71073
|
+
? (this.props.addVal({ label: event.target.value, value: this.props.options.length + 1 }, Number(this.state.value)),
|
71074
|
+
this.updateCustomValue(),
|
71075
|
+
this.forceUpdate())
|
71076
|
+
: null;
|
71077
|
+
}, onBlur: (event) => {
|
71078
|
+
this.props.addVal != undefined
|
71079
|
+
? (this.props.addVal({ label: event.target.value, value: this.props.options.length + 1 }, Number(this.state.value)),
|
71080
|
+
this.updateCustomValue(),
|
71081
|
+
this.forceUpdate())
|
71082
|
+
: null;
|
71083
|
+
} })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("select", { onChange: (evt) => this.updateValue(evt.target.value), value: this.state.value === -1 || this.state.value === null || this.state.value === undefined ? 1 : this.state.value, children: this.props.options.map((option, i) => {
|
71040
71084
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("option", { selected: option.selected, value: option.value, title: option.label, children: option.label }, option.label + i));
|
71041
|
-
}) }) })] }));
|
71085
|
+
}) })) })] }));
|
71042
71086
|
}
|
71043
71087
|
}
|
71044
71088
|
|