@babylonjs/gui-editor 5.18.0 → 5.19.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.
@@ -49644,7 +49644,9 @@ class ColorPicker extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
49644
49644
  this.props.onColorChanged(this.state.color.clone());
49645
49645
  }
49646
49646
  render() {
49647
- const colorHex = this.state.color.toHexString();
49647
+ const color4 = core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.Color4.FromColor3(this.state.color);
49648
+ color4.a = this.state.alpha;
49649
+ const colorHex = color4.toHexString();
49648
49650
  const hsv = this.state.color.toHSV();
49649
49651
  const colorRef = new core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.Color3();
49650
49652
  core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.Color3.HSVtoRGBToRef(hsv.r, 1, 1, colorRef);
@@ -50268,8 +50270,8 @@ class FloatLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
50268
50270
  this.props.lockObject.lock = false;
50269
50271
  }
50270
50272
  }
50271
- incrementValue(amount) {
50272
- if (this.props.step) {
50273
+ incrementValue(amount, processStep = true) {
50274
+ if (processStep && this.props.step) {
50273
50275
  amount *= parseFloat(this.props.step);
50274
50276
  }
50275
50277
  let currentValue = parseFloat(this.state.value);
@@ -50279,15 +50281,22 @@ class FloatLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
50279
50281
  this.updateValue((currentValue + amount).toFixed(2));
50280
50282
  }
50281
50283
  onKeyDown(event) {
50282
- if (this.props.arrows) {
50283
- if (event.key === "ArrowUp") {
50284
- this.incrementValue(1);
50285
- event.preventDefault();
50286
- }
50287
- if (event.key === "ArrowDown") {
50288
- this.incrementValue(-1);
50289
- event.preventDefault();
50284
+ const step = parseFloat(this.props.step || this.props.isInteger ? "1" : "0.01");
50285
+ const handleArrowKey = (sign) => {
50286
+ if (event.shiftKey) {
50287
+ sign *= 10;
50288
+ if (event.ctrlKey || event.metaKey) {
50289
+ sign *= 10;
50290
+ }
50290
50291
  }
50292
+ this.incrementValue(sign * step, false);
50293
+ event.preventDefault();
50294
+ };
50295
+ if (event.key === "ArrowUp") {
50296
+ handleArrowKey(1);
50297
+ }
50298
+ else if (event.key === "ArrowDown") {
50299
+ handleArrowKey(-1);
50291
50300
  }
50292
50301
  if (event.key === "Enter" && this.props.onEnter) {
50293
50302
  this.props.onEnter(this._store);
@@ -50448,14 +50457,13 @@ class NumericInputComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
50448
50457
  }
50449
50458
  return false;
50450
50459
  }
50451
- updateValue(evt) {
50452
- const value = evt.target.value;
50453
- if (/[^0-9.-]/g.test(value)) {
50460
+ updateValue(valueString) {
50461
+ if (/[^0-9.-]/g.test(valueString)) {
50454
50462
  return;
50455
50463
  }
50456
- const valueAsNumber = parseFloat(value);
50464
+ const valueAsNumber = parseFloat(valueString);
50457
50465
  this._localChange = true;
50458
- this.setState({ value: value });
50466
+ this.setState({ value: valueString });
50459
50467
  if (isNaN(valueAsNumber)) {
50460
50468
  return;
50461
50469
  }
@@ -50473,8 +50481,34 @@ class NumericInputComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
50473
50481
  }
50474
50482
  this.props.onChange(valueAsNumber);
50475
50483
  }
50484
+ incrementValue(amount) {
50485
+ let currentValue = parseFloat(this.state.value);
50486
+ if (isNaN(currentValue)) {
50487
+ currentValue = 0;
50488
+ }
50489
+ this.updateValue((currentValue + amount).toFixed(this.props.precision !== undefined ? this.props.precision : 3));
50490
+ }
50491
+ onKeyDown(evt) {
50492
+ const step = this.props.step || 1;
50493
+ const handleArrowKey = (sign) => {
50494
+ if (evt.shiftKey) {
50495
+ sign *= 10;
50496
+ if (evt.ctrlKey || evt.metaKey) {
50497
+ sign *= 10;
50498
+ }
50499
+ }
50500
+ this.incrementValue(sign * step);
50501
+ evt.preventDefault();
50502
+ };
50503
+ if (evt.key === "ArrowUp") {
50504
+ handleArrowKey(1);
50505
+ }
50506
+ else if (evt.key === "ArrowDown") {
50507
+ handleArrowKey(-1);
50508
+ }
50509
+ }
50476
50510
  render() {
50477
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "numeric" }, { 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, className: "icon" }), this.props.label && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "numeric-label", title: this.props.label }, { children: `${this.props.label}: ` }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: this.props.step, className: "numeric-input", value: this.state.value, onChange: (evt) => this.updateValue(evt), onFocus: () => {
50511
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "numeric" }, { 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, className: "icon" }), this.props.label && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "numeric-label", title: this.props.label }, { children: `${this.props.label}: ` }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: this.props.step, className: "numeric-input", value: this.state.value, onChange: (evt) => this.updateValue(evt.target.value), onKeyDown: (evt) => this.onKeyDown(evt), onFocus: () => {
50478
50512
  if (this.props.lockObject) {
50479
50513
  this.props.lockObject.lock = true;
50480
50514
  }
@@ -56350,26 +56384,6 @@ class WorkbenchComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
56350
56384
  addControls(scene) {
56351
56385
  scene.onKeyboardObservable.add((k) => {
56352
56386
  switch (k.event.key) {
56353
- case "s": //select
56354
- case "S":
56355
- this.props.globalState.tool = _globalState__WEBPACK_IMPORTED_MODULE_2__.GUIEditorTool.SELECT;
56356
- break;
56357
- case "p": //pan
56358
- case "P":
56359
- this.props.globalState.tool = _globalState__WEBPACK_IMPORTED_MODULE_2__.GUIEditorTool.PAN;
56360
- break;
56361
- case "z": //zoom
56362
- case "Z":
56363
- this.props.globalState.tool = _globalState__WEBPACK_IMPORTED_MODULE_2__.GUIEditorTool.ZOOM;
56364
- break;
56365
- case "g": //outlines
56366
- case "G":
56367
- this.props.globalState.outlines = !this.props.globalState.outlines;
56368
- break;
56369
- case "f": //fit to window
56370
- case "F":
56371
- this.props.globalState.onFitControlsToWindowObservable.notifyObservers();
56372
- break;
56373
56387
  case "ArrowUp": // move up
56374
56388
  this.moveControls(false, k.event.shiftKey ? -ARROW_KEY_MOVEMENT_LARGE : -ARROW_KEY_MOVEMENT_SMALL);
56375
56389
  break;
@@ -56549,6 +56563,7 @@ class GlobalState {
56549
56563
  this.onOutlineChangedObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
56550
56564
  this.onPropertyChangedObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
56551
56565
  this._tool = GUIEditorTool.SELECT;
56566
+ this._prevTool = this._tool;
56552
56567
  this.onToolChangeObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
56553
56568
  this.onFitControlsToWindowObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
56554
56569
  this.onReframeWindowObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
@@ -56587,7 +56602,7 @@ class GlobalState {
56587
56602
  if (this._tool === GUIEditorTool.ZOOM) {
56588
56603
  return GUIEditorTool.ZOOM;
56589
56604
  }
56590
- else if (this._tool === GUIEditorTool.PAN || this.keys.isKeyDown("space")) {
56605
+ else if (this._tool === GUIEditorTool.PAN) {
56591
56606
  return GUIEditorTool.PAN;
56592
56607
  }
56593
56608
  else {
@@ -56597,9 +56612,16 @@ class GlobalState {
56597
56612
  set tool(newTool) {
56598
56613
  if (this._tool === newTool)
56599
56614
  return;
56615
+ this._prevTool = this._tool;
56600
56616
  this._tool = newTool;
56601
56617
  this.onToolChangeObservable.notifyObservers();
56602
56618
  }
56619
+ restorePreviousTool() {
56620
+ if (this._tool !== this._prevTool) {
56621
+ this._tool = this._prevTool;
56622
+ this.onToolChangeObservable.notifyObservers();
56623
+ }
56624
+ }
56603
56625
  /** adds copy, cut and paste listeners to the host window */
56604
56626
  registerEventListeners() {
56605
56627
  const isElementEditable = (element) => {
@@ -57288,23 +57310,25 @@ __webpack_require__.r(__webpack_exports__);
57288
57310
  /* harmony export */ });
57289
57311
  /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
57290
57312
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
57291
- /* harmony import */ var _components_propertyTab_propertyTabComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/propertyTab/propertyTabComponent */ "../../../tools/guiEditor/dist/components/propertyTab/propertyTabComponent.js");
57292
- /* harmony import */ var _portal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal */ "../../../tools/guiEditor/dist/portal.js");
57293
- /* harmony import */ var _components_log_logComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/log/logComponent */ "../../../tools/guiEditor/dist/components/log/logComponent.js");
57294
- /* harmony import */ var core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core/Misc/dataStorage */ "core/Misc/observable");
57295
- /* harmony import */ var core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5__);
57296
- /* harmony import */ var _guiNodeTools__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./guiNodeTools */ "../../../tools/guiEditor/dist/guiNodeTools.js");
57297
- /* harmony import */ var _diagram_workbench__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagram/workbench */ "../../../tools/guiEditor/dist/diagram/workbench.js");
57298
- /* harmony import */ var _sharedComponents_messageDialog__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./sharedComponents/messageDialog */ "../../../tools/guiEditor/dist/sharedComponents/messageDialog.js");
57299
- /* harmony import */ var _components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./components/sceneExplorer/sceneExplorerComponent */ "../../../tools/guiEditor/dist/components/sceneExplorer/sceneExplorerComponent.js");
57300
- /* harmony import */ var _components_commandBarComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/commandBarComponent */ "../../../tools/guiEditor/dist/components/commandBarComponent.js");
57301
- /* harmony import */ var _diagram_gizmoWrapper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagram/gizmoWrapper */ "../../../tools/guiEditor/dist/diagram/gizmoWrapper.js");
57302
- /* harmony import */ var _diagram_artBoard__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagram/artBoard */ "../../../tools/guiEditor/dist/diagram/artBoard.js");
57303
- /* harmony import */ var _controlTypes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./controlTypes */ "../../../tools/guiEditor/dist/controlTypes.js");
57304
- /* harmony import */ var _main_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./main.scss */ "../../../tools/guiEditor/dist/main.scss");
57305
- /* harmony import */ var _scss_header_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./scss/header.scss */ "../../../tools/guiEditor/dist/scss/header.scss");
57306
- /* harmony import */ var _imgs_toolbarExpandIcon_svg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./imgs/toolbarExpandIcon.svg */ "../../../tools/guiEditor/dist/imgs/toolbarExpandIcon.svg");
57307
- /* harmony import */ var _imgs_toolbarCollapseIcon_svg__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./imgs/toolbarCollapseIcon.svg */ "../../../tools/guiEditor/dist/imgs/toolbarCollapseIcon.svg");
57313
+ /* harmony import */ var _globalState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./globalState */ "../../../tools/guiEditor/dist/globalState.js");
57314
+ /* harmony import */ var _components_propertyTab_propertyTabComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/propertyTab/propertyTabComponent */ "../../../tools/guiEditor/dist/components/propertyTab/propertyTabComponent.js");
57315
+ /* harmony import */ var _portal__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./portal */ "../../../tools/guiEditor/dist/portal.js");
57316
+ /* harmony import */ var _components_log_logComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/log/logComponent */ "../../../tools/guiEditor/dist/components/log/logComponent.js");
57317
+ /* harmony import */ var core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core/Misc/dataStorage */ "core/Misc/observable");
57318
+ /* harmony import */ var core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6__);
57319
+ /* harmony import */ var _guiNodeTools__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./guiNodeTools */ "../../../tools/guiEditor/dist/guiNodeTools.js");
57320
+ /* harmony import */ var _diagram_workbench__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagram/workbench */ "../../../tools/guiEditor/dist/diagram/workbench.js");
57321
+ /* harmony import */ var _sharedComponents_messageDialog__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sharedComponents/messageDialog */ "../../../tools/guiEditor/dist/sharedComponents/messageDialog.js");
57322
+ /* harmony import */ var _components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./components/sceneExplorer/sceneExplorerComponent */ "../../../tools/guiEditor/dist/components/sceneExplorer/sceneExplorerComponent.js");
57323
+ /* harmony import */ var _components_commandBarComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./components/commandBarComponent */ "../../../tools/guiEditor/dist/components/commandBarComponent.js");
57324
+ /* harmony import */ var _diagram_gizmoWrapper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagram/gizmoWrapper */ "../../../tools/guiEditor/dist/diagram/gizmoWrapper.js");
57325
+ /* harmony import */ var _diagram_artBoard__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagram/artBoard */ "../../../tools/guiEditor/dist/diagram/artBoard.js");
57326
+ /* harmony import */ var _controlTypes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./controlTypes */ "../../../tools/guiEditor/dist/controlTypes.js");
57327
+ /* harmony import */ var _main_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./main.scss */ "../../../tools/guiEditor/dist/main.scss");
57328
+ /* harmony import */ var _scss_header_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./scss/header.scss */ "../../../tools/guiEditor/dist/scss/header.scss");
57329
+ /* harmony import */ var _imgs_toolbarExpandIcon_svg__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./imgs/toolbarExpandIcon.svg */ "../../../tools/guiEditor/dist/imgs/toolbarExpandIcon.svg");
57330
+ /* harmony import */ var _imgs_toolbarCollapseIcon_svg__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./imgs/toolbarCollapseIcon.svg */ "../../../tools/guiEditor/dist/imgs/toolbarCollapseIcon.svg");
57331
+
57308
57332
 
57309
57333
 
57310
57334
 
@@ -57326,8 +57350,43 @@ __webpack_require__.r(__webpack_exports__);
57326
57350
  class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57327
57351
  constructor(props) {
57328
57352
  super(props);
57329
- this._leftWidth = core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5__.DataStorage.ReadNumber("LeftWidth", 200);
57330
- this._rightWidth = core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5__.DataStorage.ReadNumber("RightWidth", 300);
57353
+ this._leftWidth = core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6__.DataStorage.ReadNumber("LeftWidth", 200);
57354
+ this._rightWidth = core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6__.DataStorage.ReadNumber("RightWidth", 300);
57355
+ this.addToolControls = (evt) => {
57356
+ // If the event target is a text input, we're currently focused on it, and the user
57357
+ // just wants to type normal text
57358
+ if (evt.target && evt.target instanceof HTMLInputElement && evt.target.type === "text") {
57359
+ return;
57360
+ }
57361
+ switch (evt.key) {
57362
+ case "s": //select
57363
+ case "S":
57364
+ this.props.globalState.tool = _globalState__WEBPACK_IMPORTED_MODULE_2__.GUIEditorTool.SELECT;
57365
+ break;
57366
+ case "p": //pan
57367
+ case "P":
57368
+ case " ":
57369
+ this.props.globalState.tool = _globalState__WEBPACK_IMPORTED_MODULE_2__.GUIEditorTool.PAN;
57370
+ break;
57371
+ case "z": //zoom
57372
+ case "Z":
57373
+ this.props.globalState.tool = _globalState__WEBPACK_IMPORTED_MODULE_2__.GUIEditorTool.ZOOM;
57374
+ break;
57375
+ case "g": //outlines
57376
+ case "G":
57377
+ this.props.globalState.outlines = !this.props.globalState.outlines;
57378
+ break;
57379
+ case "f": //fit to window
57380
+ case "F":
57381
+ this.props.globalState.onFitControlsToWindowObservable.notifyObservers();
57382
+ break;
57383
+ }
57384
+ };
57385
+ this.removePressToolControls = (evt) => {
57386
+ if (evt.key === " ") {
57387
+ this.props.globalState.restorePreviousTool();
57388
+ }
57389
+ };
57331
57390
  this.handlePopUp = () => {
57332
57391
  this.setState({
57333
57392
  showPreviewPopUp: true,
@@ -57417,6 +57476,12 @@ class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57417
57476
  if (navigator.userAgent.indexOf("Mobile") !== -1) {
57418
57477
  (this.props.globalState.hostDocument || document).querySelector(".blocker").style.visibility = "visible";
57419
57478
  }
57479
+ document.addEventListener("keydown", this.addToolControls);
57480
+ document.addEventListener("keyup", this.removePressToolControls);
57481
+ }
57482
+ componentWillUnmount() {
57483
+ document.removeEventListener("keydown", this.addToolControls);
57484
+ document.removeEventListener("keyup", this.removePressToolControls);
57420
57485
  }
57421
57486
  showWaitScreen() {
57422
57487
  var _a;
@@ -57446,11 +57511,11 @@ class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57446
57511
  const maxWidth = this.props.globalState.hostWindow.innerWidth;
57447
57512
  if (forLeft) {
57448
57513
  this._leftWidth = Math.max(150, Math.min(maxWidth - this._rightWidth, evt.clientX - this._rootRef.current.clientLeft));
57449
- core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteNumber("LeftWidth", this._leftWidth);
57514
+ core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6__.DataStorage.WriteNumber("LeftWidth", this._leftWidth);
57450
57515
  }
57451
57516
  else {
57452
57517
  this._rightWidth = Math.max(250, Math.min(maxWidth - this._leftWidth, this._rootRef.current.clientLeft + this._rootRef.current.clientWidth - evt.clientX));
57453
- core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteNumber("RightWidth", this._rightWidth);
57518
+ core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_6__.DataStorage.WriteNumber("RightWidth", this._rightWidth);
57454
57519
  }
57455
57520
  rootElement.style.gridTemplateColumns = this.buildColumnLayout();
57456
57521
  this.props.globalState.onWindowResizeObservable.notifyObservers();
@@ -57469,13 +57534,13 @@ class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57469
57534
  }
57470
57535
  render() {
57471
57536
  const classForElement = this.state.toolbarExpand ? "left-panel" : "left-panel expand";
57472
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_portal__WEBPACK_IMPORTED_MODULE_3__.Portal, Object.assign({ globalState: this.props.globalState }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "ge-header" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "command-bar" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_commandBarComponent__WEBPACK_IMPORTED_MODULE_10__.CommandBarComponent, { globalState: this.props.globalState }) })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "gui-editor-workbench-root", style: {
57537
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_portal__WEBPACK_IMPORTED_MODULE_4__.Portal, Object.assign({ globalState: this.props.globalState }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "ge-header" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "command-bar" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_commandBarComponent__WEBPACK_IMPORTED_MODULE_11__.CommandBarComponent, { globalState: this.props.globalState }) })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "gui-editor-workbench-root", style: {
57473
57538
  gridTemplateColumns: this.buildColumnLayout(),
57474
57539
  }, onMouseDown: (evt) => {
57475
57540
  if (evt.target.nodeName === "INPUT") {
57476
57541
  return;
57477
57542
  }
57478
- }, ref: this._rootRef, onPointerUp: (evt) => this.onPointerUp(evt) }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: classForElement }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_9__.SceneExplorerComponent, { globalState: this.props.globalState, noExpand: true }), this.createToolbar(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "leftGrab", onPointerDown: (evt) => this.onPointerDown(evt), onPointerMove: (evt) => this.resizeColumns(evt) })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_9__.SceneExplorerComponent, { globalState: this.props.globalState, noExpand: true }), this.createToolbar(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "diagram-container", onDrop: (event) => {
57543
+ }, ref: this._rootRef, onPointerUp: (evt) => this.onPointerUp(evt) }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: classForElement }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_10__.SceneExplorerComponent, { globalState: this.props.globalState, noExpand: true }), this.createToolbar(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "leftGrab", onPointerDown: (evt) => this.onPointerDown(evt), onPointerMove: (evt) => this.resizeColumns(evt) })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_sceneExplorer_sceneExplorerComponent__WEBPACK_IMPORTED_MODULE_10__.SceneExplorerComponent, { globalState: this.props.globalState, noExpand: true }), this.createToolbar(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "diagram-container", onDrop: (event) => {
57479
57544
  event.preventDefault();
57480
57545
  this.props.globalState.onDropObservable.notifyObservers();
57481
57546
  this.props.globalState.onParentingChangeObservable.notifyObservers(null);
@@ -57483,10 +57548,10 @@ class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57483
57548
  event.preventDefault();
57484
57549
  }, style: {
57485
57550
  backgroundColor: this.props.globalState.backgroundColor.toHexString(),
57486
- } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_diagram_artBoard__WEBPACK_IMPORTED_MODULE_12__.ArtBoardComponent, { globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_diagram_workbench__WEBPACK_IMPORTED_MODULE_7__.WorkbenchComponent, { ref: "workbenchCanvas", globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_diagram_gizmoWrapper__WEBPACK_IMPORTED_MODULE_11__.GizmoWrapper, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "right-panel" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "rightGrab", onPointerDown: (evt) => this.onPointerDown(evt), onPointerMove: (evt) => this.resizeColumns(evt, false) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_propertyTabComponent__WEBPACK_IMPORTED_MODULE_2__.PropertyTabComponent, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_log_logComponent__WEBPACK_IMPORTED_MODULE_4__.LogComponent, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_messageDialog__WEBPACK_IMPORTED_MODULE_8__.MessageDialogComponent, { globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blocker" }, { children: "GUI Editor runs only on desktop" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "wait-screen hidden" }, { children: "Processing...please wait" }))] })));
57551
+ } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_diagram_artBoard__WEBPACK_IMPORTED_MODULE_13__.ArtBoardComponent, { globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_diagram_workbench__WEBPACK_IMPORTED_MODULE_8__.WorkbenchComponent, { ref: "workbenchCanvas", globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_diagram_gizmoWrapper__WEBPACK_IMPORTED_MODULE_12__.GizmoWrapper, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "right-panel" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "rightGrab", onPointerDown: (evt) => this.onPointerDown(evt), onPointerMove: (evt) => this.resizeColumns(evt, false) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_propertyTabComponent__WEBPACK_IMPORTED_MODULE_3__.PropertyTabComponent, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_log_logComponent__WEBPACK_IMPORTED_MODULE_5__.LogComponent, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_messageDialog__WEBPACK_IMPORTED_MODULE_9__.MessageDialogComponent, { globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blocker" }, { children: "GUI Editor runs only on desktop" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "wait-screen hidden" }, { children: "Processing...please wait" }))] })));
57487
57552
  }
57488
57553
  onCreate(value) {
57489
- const guiElement = _guiNodeTools__WEBPACK_IMPORTED_MODULE_6__.GUINodeTools.CreateControlFromString(value);
57554
+ const guiElement = _guiNodeTools__WEBPACK_IMPORTED_MODULE_7__.GUINodeTools.CreateControlFromString(value);
57490
57555
  const newGuiNode = this.props.globalState.workbench.appendBlock(guiElement);
57491
57556
  this.props.globalState.setSelection([newGuiNode]);
57492
57557
  this.props.globalState.onPointerUpObservable.notifyObservers(null);
@@ -57494,7 +57559,7 @@ class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57494
57559
  return newGuiNode;
57495
57560
  }
57496
57561
  createBlackLine() {
57497
- const icon = this.state.toolbarExpand ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _imgs_toolbarExpandIcon_svg__WEBPACK_IMPORTED_MODULE_16__, className: "icon" }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _imgs_toolbarCollapseIcon_svg__WEBPACK_IMPORTED_MODULE_17__, className: "icon" });
57562
+ const icon = this.state.toolbarExpand ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _imgs_toolbarExpandIcon_svg__WEBPACK_IMPORTED_MODULE_17__, className: "icon" }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _imgs_toolbarCollapseIcon_svg__WEBPACK_IMPORTED_MODULE_18__, className: "icon" });
57498
57563
  return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blackLine" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "arrow", onClick: () => this.switchExpandedState() }, { children: icon })) })));
57499
57564
  }
57500
57565
  createToolbarHelper(ct) {
@@ -57508,10 +57573,10 @@ class WorkbenchEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
57508
57573
  }
57509
57574
  createToolbar() {
57510
57575
  if (this.state.toolbarExpand) {
57511
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "toolbarGrab" }, { children: [this.createBlackLine(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "toolbar-content-sub1" }, { children: this.createToolbarHelper(_controlTypes__WEBPACK_IMPORTED_MODULE_13__.ControlTypes) }))] })) }));
57576
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "toolbarGrab" }, { children: [this.createBlackLine(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "toolbar-content-sub1" }, { children: this.createToolbarHelper(_controlTypes__WEBPACK_IMPORTED_MODULE_14__.ControlTypes) }))] })) }));
57512
57577
  }
57513
57578
  else {
57514
- return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "toolbarGrab expanded" }, { children: [this.createBlackLine(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "toolbar-content-sub1" }, { children: [this.createToolbarHelper(_controlTypes__WEBPACK_IMPORTED_MODULE_13__.ControlTypes.slice(0, Math.ceil(_controlTypes__WEBPACK_IMPORTED_MODULE_13__.ControlTypes.length / 2))), this.createToolbarHelper(_controlTypes__WEBPACK_IMPORTED_MODULE_13__.ControlTypes.slice(Math.ceil(_controlTypes__WEBPACK_IMPORTED_MODULE_13__.ControlTypes.length / 2)))] }))] })) }));
57579
+ return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "toolbarGrab expanded" }, { children: [this.createBlackLine(), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "toolbar-content-sub1" }, { children: [this.createToolbarHelper(_controlTypes__WEBPACK_IMPORTED_MODULE_14__.ControlTypes.slice(0, Math.ceil(_controlTypes__WEBPACK_IMPORTED_MODULE_14__.ControlTypes.length / 2))), this.createToolbarHelper(_controlTypes__WEBPACK_IMPORTED_MODULE_14__.ControlTypes.slice(Math.ceil(_controlTypes__WEBPACK_IMPORTED_MODULE_14__.ControlTypes.length / 2)))] }))] })) }));
57515
57580
  }
57516
57581
  }
57517
57582
  }