@babylonjs/gui 7.34.3 → 7.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/2D/FrameGraph/guiTask.js.map +1 -1
  2. package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -1
  3. package/2D/adtInstrumentation.js.map +1 -1
  4. package/2D/advancedDynamicTexture.d.ts +1 -1
  5. package/2D/advancedDynamicTexture.js.map +1 -1
  6. package/2D/controls/button.js.map +1 -1
  7. package/2D/controls/checkbox.js.map +1 -1
  8. package/2D/controls/colorpicker.js.map +1 -1
  9. package/2D/controls/container.js.map +1 -1
  10. package/2D/controls/control.js.map +1 -1
  11. package/2D/controls/displayGrid.js.map +1 -1
  12. package/2D/controls/ellipse.js.map +1 -1
  13. package/2D/controls/focusableButton.js.map +1 -1
  14. package/2D/controls/gradient/BaseGradient.js.map +1 -1
  15. package/2D/controls/grid.js.map +1 -1
  16. package/2D/controls/image.js.map +1 -1
  17. package/2D/controls/inputPassword.js.map +1 -1
  18. package/2D/controls/inputText.js.map +1 -1
  19. package/2D/controls/inputTextArea.js.map +1 -1
  20. package/2D/controls/line.js.map +1 -1
  21. package/2D/controls/multiLine.js.map +1 -1
  22. package/2D/controls/radioButton.js.map +1 -1
  23. package/2D/controls/rectangle.js.map +1 -1
  24. package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
  25. package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
  26. package/2D/controls/selector.js.map +1 -1
  27. package/2D/controls/sliders/baseSlider.js.map +1 -1
  28. package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
  29. package/2D/controls/sliders/imageScrollBar.js.map +1 -1
  30. package/2D/controls/sliders/scrollBar.js.map +1 -1
  31. package/2D/controls/sliders/slider.js.map +1 -1
  32. package/2D/controls/stackPanel.js.map +1 -1
  33. package/2D/controls/statics.js.map +1 -1
  34. package/2D/controls/textBlock.js.map +1 -1
  35. package/2D/controls/textWrapper.js.map +1 -1
  36. package/2D/controls/toggleButton.js.map +1 -1
  37. package/2D/controls/virtualKeyboard.js.map +1 -1
  38. package/2D/math2D.js.map +1 -1
  39. package/2D/measure.js.map +1 -1
  40. package/2D/multiLinePoint.js.map +1 -1
  41. package/2D/style.js.map +1 -1
  42. package/2D/valueAndUnit.js.map +1 -1
  43. package/2D/xmlLoader.js.map +1 -1
  44. package/3D/behaviors/defaultBehavior.js.map +1 -1
  45. package/3D/controls/MRTK3/touchHolographicButton.js.map +1 -1
  46. package/3D/controls/button3D.js.map +1 -1
  47. package/3D/controls/container3D.js.map +1 -1
  48. package/3D/controls/contentDisplay3D.js.map +1 -1
  49. package/3D/controls/control3D.js.map +1 -1
  50. package/3D/controls/cylinderPanel.js.map +1 -1
  51. package/3D/controls/holographicBackplate.js.map +1 -1
  52. package/3D/controls/holographicButton.js.map +1 -1
  53. package/3D/controls/holographicSlate.js.map +1 -1
  54. package/3D/controls/meshButton3D.js.map +1 -1
  55. package/3D/controls/nearMenu.js.map +1 -1
  56. package/3D/controls/planePanel.js.map +1 -1
  57. package/3D/controls/scatterPanel.js.map +1 -1
  58. package/3D/controls/slider3D.js.map +1 -1
  59. package/3D/controls/spherePanel.js.map +1 -1
  60. package/3D/controls/stackPanel3D.js.map +1 -1
  61. package/3D/controls/touchButton3D.js.map +1 -1
  62. package/3D/controls/touchHolographicButton.js.map +1 -1
  63. package/3D/controls/touchHolographicMenu.js.map +1 -1
  64. package/3D/controls/touchMeshButton3D.js.map +1 -1
  65. package/3D/controls/volumeBasedPanel.js.map +1 -1
  66. package/3D/gizmos/gizmoHandle.js.map +1 -1
  67. package/3D/gizmos/slateGizmo.js.map +1 -1
  68. package/3D/gui3DManager.js.map +1 -1
  69. package/3D/materials/fluent/fluentMaterial.js.map +1 -1
  70. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
  71. package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
  72. package/3D/materials/handle/handleMaterial.js.map +1 -1
  73. package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -1
  74. package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
  75. package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -1
  76. package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -1
  77. package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
  78. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
  79. package/legacy/legacy.js.map +1 -1
  80. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"inputTextArea.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/inputTextArea.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAEjD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,SAAS;IAkCxC,wGAAwG;IAExG,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB,CAAC,KAAc;QACvC,IAAI,IAAI,CAAC,kBAAkB,KAAK,KAAK,EAAE;YACnC,OAAO;SACV;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,IAAoB,MAAM,CAAC,KAAsB;QAC7C,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;QAErC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;YAC7C,OAAO;SACV;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;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AAC;YACnB,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;YACxC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;YACjE,kBAAkB,EAAE,CAAC;YACrB,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;SAC3C,CAAC;QAEF,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAEe,OAAO;QACnB,KAAK,CAAC,OAAO,EAAE,CAAC;QAEhB,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;CACJ;AA1oCG;IADC,SAAS,EAAE;sDAGX;AA0BD;IADC,SAAS,EAAE;8CAGX;AA6mCL,aAAa,CAAC,2BAA2B,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport type { Vector2 } from \"core/Maths/math.vector\";\r\n\r\nimport { Control } from \"./control\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport type { VirtualKeyboard } from \"./virtualKeyboard\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { Measure } from \"../measure\";\r\nimport { InputText } from \"./inputText\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport type { PointerInfo, PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport type { IKeyboardEvent } from \"core/Events/deviceInputEvents\";\r\n\r\nimport { serialize } from \"core/Misc/decorators\";\r\n\r\n/**\r\n * Class used to create input text control\r\n */\r\nexport class InputTextArea extends InputText {\r\n private _textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n private _textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n\r\n private _prevText: string = this.text;\r\n\r\n private _lines: any[];\r\n private _lineSpacing: ValueAndUnit = new ValueAndUnit(0);\r\n private _maxHeight = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\r\n\r\n private _clipTextTop: number;\r\n private _clipTextLeft: number;\r\n\r\n private _cursorInfo: { globalStartIndex: number; globalEndIndex: number; relativeStartIndex: number; relativeEndIndex: number; currentLineIndex: number };\r\n private _highlightCursorInfo: { initialStartIndex: number; initialRelativeStartIndex: number; initialLineIndex: number };\r\n\r\n /**\r\n * An event triggered after the text was broken up into lines\r\n */\r\n public onLinesReadyObservable = new Observable<InputTextArea>();\r\n\r\n /** @internal */\r\n public override _connectedVirtualKeyboard: Nullable<VirtualKeyboard>;\r\n private _contextForBreakLines: ICanvasRenderingContext;\r\n private _clickedCoordinateX: Nullable<number>;\r\n private _clickedCoordinateY: Nullable<number>;\r\n\r\n private _availableWidth: number;\r\n private _availableHeight: number;\r\n\r\n private _scrollTop: Nullable<number>;\r\n\r\n private _autoStretchHeight: boolean;\r\n\r\n /** Gets or sets a boolean indicating if the control can auto stretch its height to adapt to the text */\r\n @serialize()\r\n public get autoStretchHeight(): boolean {\r\n return this._autoStretchHeight;\r\n }\r\n\r\n public set autoStretchHeight(value: boolean) {\r\n if (this._autoStretchHeight === value) {\r\n return;\r\n }\r\n\r\n this._autoStretchHeight = value;\r\n this._markAsDirty();\r\n }\r\n\r\n public override set height(value: string | number) {\r\n this.fixedRatioMasterIsWidth = false;\r\n\r\n if (this._height.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._height.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n\r\n this._autoStretchHeight = false;\r\n }\r\n\r\n @serialize()\r\n public get maxHeight(): string | number {\r\n return this._maxHeight.toString(this._host);\r\n }\r\n\r\n /** Gets the maximum width allowed by the control in pixels */\r\n public get maxHeightInPixels(): number {\r\n return this._maxHeight.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set maxHeight(value: string | number) {\r\n if (this._maxHeight.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._maxHeight.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new InputTextArea\r\n * @param name defines the control name\r\n * @param text defines the text of the control\r\n */\r\n constructor(\r\n public override name?: string,\r\n text: string = \"\"\r\n ) {\r\n super(name);\r\n\r\n this.text = text;\r\n\r\n this.isPointerBlocker = true;\r\n\r\n this.onLinesReadyObservable.add(() => this._updateCursorPosition());\r\n\r\n this._highlightCursorInfo = {\r\n initialStartIndex: -1,\r\n initialRelativeStartIndex: -1,\r\n initialLineIndex: -1,\r\n };\r\n\r\n this._cursorInfo = {\r\n globalStartIndex: 0,\r\n globalEndIndex: 0,\r\n relativeEndIndex: 0,\r\n relativeStartIndex: 0,\r\n currentLineIndex: 0,\r\n };\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"InputTextArea\";\r\n }\r\n\r\n /**\r\n * Handles the keyboard event\r\n * @param evt Defines the KeyboardEvent\r\n */\r\n public override processKeyboard(evt: IKeyboardEvent): void {\r\n if (this.isReadOnly) {\r\n return;\r\n }\r\n\r\n // process pressed key\r\n this.alternativeProcessKey(evt.code, evt.key, evt);\r\n\r\n this.onKeyboardEventProcessedObservable.notifyObservers(evt);\r\n }\r\n\r\n /**\r\n * Process the last keyboard input\r\n *\r\n * @param code The ascii input number\r\n * @param key The key string representation\r\n * @param evt The keyboard event emits with input\r\n * @internal\r\n */\r\n public alternativeProcessKey(code: string, key?: string, evt?: IKeyboardEvent) {\r\n //return if clipboard event keys (i.e -ctr/cmd + c,v,x)\r\n if (evt && (evt.ctrlKey || evt.metaKey) && (key === \"c\" || key === \"v\" || key === \"x\")) {\r\n return;\r\n }\r\n\r\n // Specific cases\r\n switch (code) {\r\n case \"Period\": //SLASH\r\n if (evt && evt.shiftKey) {\r\n evt.preventDefault();\r\n }\r\n break;\r\n case \"Backspace\": // BACKSPACE\r\n if (!this._isTextHighlightOn && this._cursorInfo.globalStartIndex > 0) {\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalStartIndex--;\r\n }\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n if (evt) {\r\n evt.preventDefault();\r\n }\r\n\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n\r\n this._textHasChanged();\r\n break;\r\n case \"Delete\": // DELETE\r\n if (!this._isTextHighlightOn && this._cursorInfo.globalEndIndex < this.text.length) {\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex + 1;\r\n }\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n if (evt) {\r\n evt.preventDefault();\r\n }\r\n\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n\r\n this._textHasChanged();\r\n break;\r\n case \"NumpadEnter\": // NUMPAD ENTER\r\n case \"Enter\": // RETURN\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, \"\\n\");\r\n this._cursorInfo.globalStartIndex++;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n\r\n this._textHasChanged();\r\n return;\r\n case \"End\": // END\r\n this._cursorInfo.globalStartIndex = this.text.length;\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n this._markAsDirty();\r\n return;\r\n case \"Home\": // HOME\r\n this._cursorInfo.globalStartIndex = 0;\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n this._markAsDirty();\r\n return;\r\n case \"ArrowLeft\": // LEFT\r\n this._markAsDirty();\r\n\r\n if (evt && evt.shiftKey) {\r\n // shift + ctrl/cmd + <-\r\n if (evt.ctrlKey || evt.metaKey) {\r\n // Go to line's start by substract the relativeStartIndex to the globalStartIndex\r\n this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;\r\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\r\n }\r\n // store the starting point\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalStartIndex--;\r\n this._isTextHighlightOn = true;\r\n } else {\r\n if (this._cursorInfo.globalEndIndex > this._highlightCursorInfo.initialStartIndex) {\r\n this._cursorInfo.globalEndIndex--;\r\n } else {\r\n this._cursorInfo.globalStartIndex--;\r\n }\r\n }\r\n this._blinkIsEven = true;\r\n evt.preventDefault();\r\n return;\r\n }\r\n\r\n if (this._isTextHighlightOn) {\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n } else if (evt && (evt.ctrlKey || evt.metaKey)) {\r\n // ctr + <-\r\n this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;\r\n evt.preventDefault();\r\n } else if (this._cursorInfo.globalStartIndex > 0) {\r\n this._cursorInfo.globalStartIndex--;\r\n }\r\n\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n return;\r\n case \"ArrowRight\": // RIGHT\r\n this._markAsDirty();\r\n\r\n if (evt && evt.shiftKey) {\r\n // shift + ctrl/cmd + ->\r\n if (evt.ctrlKey || evt.metaKey) {\r\n const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex - 1;\r\n this._cursorInfo.globalEndIndex += rightDelta;\r\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\r\n }\r\n // store the starting point\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalEndIndex++;\r\n this._isTextHighlightOn = true;\r\n } else {\r\n if (this._cursorInfo.globalStartIndex < this._highlightCursorInfo.initialStartIndex) {\r\n this._cursorInfo.globalStartIndex++;\r\n } else {\r\n this._cursorInfo.globalEndIndex++;\r\n }\r\n }\r\n this._blinkIsEven = true;\r\n evt.preventDefault();\r\n return;\r\n }\r\n if (this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex;\r\n } else if (evt && (evt.ctrlKey || evt.metaKey)) {\r\n //ctr + ->\r\n const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex;\r\n this._cursorInfo.globalStartIndex += rightDelta;\r\n } else if (this._cursorInfo.globalStartIndex < this.text.length) {\r\n this._cursorInfo.globalStartIndex++;\r\n }\r\n\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n return;\r\n case \"ArrowUp\": // UP\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n\r\n if (evt) {\r\n if (evt.shiftKey) {\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n }\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n } else {\r\n this._isTextHighlightOn = false;\r\n }\r\n evt.preventDefault();\r\n }\r\n\r\n if (this._cursorInfo.currentLineIndex === 0) {\r\n // First line\r\n this._cursorInfo.globalStartIndex = 0;\r\n } else {\r\n const currentLine = this._lines[this._cursorInfo.currentLineIndex];\r\n const upperLine = this._lines[this._cursorInfo.currentLineIndex - 1];\r\n\r\n let tmpIndex = 0;\r\n let relativeIndex = 0;\r\n if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\r\n tmpIndex = this._cursorInfo.globalStartIndex;\r\n relativeIndex = this._cursorInfo.relativeStartIndex;\r\n } else {\r\n tmpIndex = this._cursorInfo.globalEndIndex;\r\n relativeIndex = this._cursorInfo.relativeEndIndex;\r\n }\r\n\r\n const currentText = currentLine.text.substring(0, relativeIndex);\r\n const currentWidth = this._contextForBreakLines.measureText(currentText).width;\r\n\r\n let upperWidth = 0;\r\n let previousWidth = 0;\r\n\r\n tmpIndex -= relativeIndex; // Start of current line\r\n tmpIndex -= upperLine.text.length + upperLine.lineEnding.length; // Start of upper line\r\n let upperLineRelativeIndex = 0;\r\n\r\n while (upperWidth < currentWidth && upperLineRelativeIndex < upperLine.text.length) {\r\n tmpIndex++;\r\n upperLineRelativeIndex++;\r\n previousWidth = Math.abs(currentWidth - upperWidth);\r\n upperWidth = this._contextForBreakLines.measureText(upperLine.text.substring(0, upperLineRelativeIndex)).width;\r\n }\r\n\r\n // Find closest move\r\n if (Math.abs(currentWidth - upperWidth) > previousWidth && upperLineRelativeIndex > 0) {\r\n tmpIndex--;\r\n }\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n } else if (this._cursorInfo.currentLineIndex <= this._highlightCursorInfo.initialLineIndex) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\r\n this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;\r\n } else {\r\n this._cursorInfo.globalEndIndex = tmpIndex;\r\n }\r\n }\r\n\r\n this._markAsDirty();\r\n return;\r\n case \"ArrowDown\": // DOWN\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n\r\n if (evt) {\r\n if (evt.shiftKey) {\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n }\r\n\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n } else {\r\n this._isTextHighlightOn = false;\r\n }\r\n evt.preventDefault();\r\n }\r\n\r\n if (this._cursorInfo.currentLineIndex === this._lines.length - 1) {\r\n // Last line\r\n this._cursorInfo.globalStartIndex = this.text.length;\r\n } else {\r\n const currentLine = this._lines[this._cursorInfo.currentLineIndex];\r\n const underLine = this._lines[this._cursorInfo.currentLineIndex + 1];\r\n\r\n let tmpIndex = 0;\r\n let relativeIndex = 0;\r\n if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\r\n tmpIndex = this._cursorInfo.globalStartIndex;\r\n relativeIndex = this._cursorInfo.relativeStartIndex;\r\n } else {\r\n tmpIndex = this._cursorInfo.globalEndIndex;\r\n relativeIndex = this._cursorInfo.relativeEndIndex;\r\n }\r\n\r\n const currentText = currentLine.text.substring(0, relativeIndex);\r\n const currentWidth = this._contextForBreakLines.measureText(currentText).width;\r\n\r\n let underWidth = 0;\r\n let previousWidth = 0;\r\n\r\n tmpIndex += currentLine.text.length - relativeIndex + currentLine.lineEnding.length; // Start of current line\r\n let underLineRelativeIndex = 0;\r\n\r\n while (underWidth < currentWidth && underLineRelativeIndex < underLine.text.length) {\r\n tmpIndex++;\r\n underLineRelativeIndex++;\r\n previousWidth = Math.abs(currentWidth - underWidth);\r\n underWidth = this._contextForBreakLines.measureText(underLine.text.substring(0, underLineRelativeIndex)).width;\r\n }\r\n\r\n // Find closest move\r\n if (Math.abs(currentWidth - underWidth) > previousWidth && underLineRelativeIndex > 0) {\r\n tmpIndex--;\r\n }\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n } else if (this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n if (this._cursorInfo.globalStartIndex > this._cursorInfo.globalEndIndex) {\r\n this._cursorInfo.globalEndIndex += this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalEndIndex -= this._cursorInfo.globalStartIndex;\r\n }\r\n } else {\r\n this._cursorInfo.globalEndIndex = tmpIndex;\r\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\r\n }\r\n }\r\n\r\n this._markAsDirty();\r\n return;\r\n }\r\n\r\n // special case - select all. Use key instead of code to support all keyboard layouts\r\n if (key === \"a\" && evt && (evt.ctrlKey || evt.metaKey)) {\r\n this.selectAllText();\r\n evt.preventDefault();\r\n return;\r\n }\r\n\r\n // Printable characters\r\n if (key?.length === 1) {\r\n evt?.preventDefault();\r\n this._currentKey = key;\r\n this.onBeforeKeyAddObservable.notifyObservers(this);\r\n key = this._currentKey;\r\n if (this._addKey) {\r\n this._isTextHighlightOn = false;\r\n this._blinkIsEven = false;\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, key);\r\n this._cursorInfo.globalStartIndex += key.length;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n this._textHasChanged();\r\n }\r\n }\r\n }\r\n\r\n protected _parseLineWordWrap(line: string = \"\", width: number, context: ICanvasRenderingContext): { text: string; width: number; lineEnding: string }[] {\r\n const lines = [];\r\n const words = line.split(\" \");\r\n let lineWidth = 0;\r\n\r\n for (let n = 0; n < words.length; n++) {\r\n const testLine = n > 0 ? line + \" \" + words[n] : words[0];\r\n const metrics = context.measureText(testLine);\r\n const testWidth = metrics.width;\r\n if (testWidth > width) {\r\n if (n > 0) {\r\n // Avoid first word duplication if of too long\r\n lineWidth = context.measureText(line).width;\r\n lines.push({ text: line, width: lineWidth, lineEnding: \" \" });\r\n }\r\n\r\n line = words[n];\r\n\r\n let flushedLine = \"\";\r\n\r\n line.split(\"\").map((char) => {\r\n if (context.measureText(flushedLine + char).width > width) {\r\n lines.push({ text: flushedLine, width: context.measureText(flushedLine).width, lineEnding: \"\" });\r\n flushedLine = \"\";\r\n }\r\n flushedLine += char;\r\n });\r\n\r\n line = flushedLine;\r\n // Measure remaining characters\r\n lineWidth = context.measureText(line).width;\r\n } else {\r\n lineWidth = testWidth;\r\n line = testLine;\r\n }\r\n }\r\n lines.push({ text: line, width: lineWidth, lineEnding: \" \" });\r\n\r\n return lines;\r\n }\r\n\r\n protected _breakLines(refWidth: number, context: ICanvasRenderingContext): object[] {\r\n const lines: { text: string; width: number; lineEnding: string }[] = [];\r\n const _lines = (this.text || this.placeholderText).split(\"\\n\");\r\n\r\n if (this.clipContent) {\r\n for (const _line of _lines) {\r\n lines.push(...this._parseLineWordWrap(_line, refWidth, context));\r\n }\r\n } else {\r\n for (const _line of _lines) {\r\n lines.push(this._parseLine(_line, context));\r\n }\r\n }\r\n\r\n lines[lines.length - 1].lineEnding = \"\\n\";\r\n\r\n return lines;\r\n }\r\n\r\n protected _parseLine(line: string = \"\", context: ICanvasRenderingContext): { text: string; width: number; lineEnding: string } {\r\n return { text: line, width: context.measureText(line).width, lineEnding: \" \" };\r\n }\r\n\r\n /**\r\n * Processing of child right before the parent measurement update\r\n *\r\n * @param parentMeasure The parent measure\r\n * @param context The rendering canvas\r\n * @internal\r\n */\r\n protected override _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n if (!this._fontOffset || this._wasDirty) {\r\n this._fontOffset = Control._GetFontOffset(context.font, this._host.getScene()?.getEngine());\r\n }\r\n\r\n let text = this._beforeRenderText(this._textWrapper).text;\r\n\r\n // placeholder conditions and color setting\r\n if (!this.text && this._placeholderText) {\r\n text = this._placeholderText;\r\n }\r\n\r\n // measures the textlength -> this.measure.width\r\n this._textWidth = context.measureText(text).width;\r\n // we double up the margin width\r\n const marginWidth = this._margin.getValueInPixel(this._host, parentMeasure.width) * 2;\r\n\r\n if (this._autoStretchWidth) {\r\n const tmpLines = text.split(\"\\n\");\r\n const longerString = tmpLines.reduce((acc: string, val: string) => {\r\n const valueLength = context.measureText(val).width;\r\n const accLength = context.measureText(acc).width;\r\n return valueLength > accLength ? val : acc;\r\n }, \"\");\r\n\r\n const longerStringWidth = context.measureText(longerString).width;\r\n this.width = Math.min(this._maxWidth.getValueInPixel(this._host, parentMeasure.width), longerStringWidth + marginWidth) + \"px\";\r\n\r\n this.autoStretchWidth = true;\r\n }\r\n\r\n this._availableWidth = this._width.getValueInPixel(this._host, parentMeasure.width) - marginWidth;\r\n\r\n // Prepare lines\r\n this._lines = this._breakLines(this._availableWidth, context);\r\n // can we find a cleaner implementation here?\r\n this._contextForBreakLines = context;\r\n\r\n if (this._autoStretchHeight) {\r\n const textHeight = this._lines.length * this._fontOffset.height;\r\n const totalHeight = textHeight + this._margin.getValueInPixel(this._host, parentMeasure.height) * 2;\r\n this.height = Math.min(this._maxHeight.getValueInPixel(this._host, parentMeasure.height), totalHeight) + \"px\";\r\n\r\n this._autoStretchHeight = true;\r\n }\r\n\r\n this._availableHeight = this._height.getValueInPixel(this._host, parentMeasure.height) - marginWidth;\r\n\r\n if (this._isFocused) {\r\n this._cursorInfo.currentLineIndex = 0;\r\n\r\n let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n let tmpLength = 0;\r\n\r\n while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {\r\n tmpLength += lineLength;\r\n\r\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\r\n this._cursorInfo.currentLineIndex++;\r\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected override _textHasChanged() {\r\n if (!this._prevText && this._textWrapper.text && this.placeholderText) {\r\n this._cursorInfo.currentLineIndex = 0;\r\n this._cursorInfo.globalStartIndex = 1;\r\n this._cursorInfo.globalEndIndex = 1;\r\n this._cursorInfo.relativeStartIndex = 1;\r\n this._cursorInfo.relativeEndIndex = 1;\r\n }\r\n super._textHasChanged();\r\n }\r\n\r\n private _computeScroll() {\r\n this._clipTextLeft = this._currentMeasure.left + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n this._clipTextTop = this._currentMeasure.top + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n\r\n if (this._isFocused && this._lines[this._cursorInfo.currentLineIndex].width > this._availableWidth) {\r\n const textLeft = this._clipTextLeft - this._lines[this._cursorInfo.currentLineIndex].width + this._availableWidth;\r\n\r\n if (!this._scrollLeft) {\r\n this._scrollLeft = textLeft;\r\n }\r\n } else {\r\n this._scrollLeft = this._clipTextLeft;\r\n }\r\n\r\n if (this._isFocused) {\r\n const selectedHeight = (this._cursorInfo.currentLineIndex + 1) * this._fontOffset.height;\r\n const textTop = this._clipTextTop - selectedHeight;\r\n\r\n if (!this._scrollTop) {\r\n this._scrollTop = textTop;\r\n }\r\n } else {\r\n this._scrollTop = this._clipTextTop;\r\n }\r\n }\r\n\r\n /**\r\n * Processing of child after the parent measurement update\r\n *\r\n * @internal\r\n */\r\n protected override _additionalProcessing(): void {\r\n // Flush the highlighted text each frame\r\n this.highlightedText = \"\";\r\n\r\n this.onLinesReadyObservable.notifyObservers(this);\r\n }\r\n\r\n private _drawText(text: string, textWidth: number, y: number, context: ICanvasRenderingContext): void {\r\n const width = this._currentMeasure.width;\r\n let x = this._scrollLeft as number;\r\n switch (this._textHorizontalAlignment) {\r\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\r\n x += 0;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\r\n x += width - textWidth;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\r\n x += (width - textWidth) / 2;\r\n break;\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n if (this.outlineWidth) {\r\n context.strokeText(text, this._currentMeasure.left + x, y);\r\n }\r\n context.fillText(text, x, y);\r\n }\r\n\r\n /**\r\n * Copy the text in the clipboard\r\n *\r\n * @param ev The clipboard event\r\n * @internal\r\n */\r\n protected override _onCopyText(ev: ClipboardEvent): void {\r\n this._isTextHighlightOn = false;\r\n //when write permission to clipbaord data is denied\r\n try {\r\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\r\n } catch {} //pass\r\n this._host.clipboardData = this._highlightedText;\r\n }\r\n\r\n /**\r\n * Cut the text and copy it in the clipboard\r\n *\r\n * @param ev The clipboard event\r\n * @internal\r\n */\r\n protected override _onCutText(ev: ClipboardEvent): void {\r\n if (!this._highlightedText) {\r\n return;\r\n }\r\n //when write permission to clipbaord data is denied\r\n try {\r\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\r\n } catch {} //pass\r\n\r\n this._host.clipboardData = this._highlightedText;\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n this._textHasChanged();\r\n }\r\n\r\n /**\r\n * Paste the copied text from the clipboard\r\n *\r\n * @param ev The clipboard event\r\n * @internal\r\n */\r\n protected override _onPasteText(ev: ClipboardEvent): void {\r\n let data: string = \"\";\r\n if (ev.clipboardData && ev.clipboardData.types.indexOf(\"text/plain\") !== -1) {\r\n data = ev.clipboardData.getData(\"text/plain\");\r\n } else {\r\n //get the cached data; returns blank string by default\r\n data = this._host.clipboardData;\r\n }\r\n\r\n this._isTextHighlightOn = false;\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, data);\r\n\r\n const deltaIndex = data.length - (this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex);\r\n\r\n this._cursorInfo.globalStartIndex += deltaIndex;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._clickedCoordinateX = null;\r\n this._clickedCoordinateY = null;\r\n\r\n super._textHasChanged();\r\n }\r\n\r\n public override _draw(context: ICanvasRenderingContext): void {\r\n this._computeScroll();\r\n\r\n this._scrollLeft = this._scrollLeft ?? 0;\r\n this._scrollTop = this._scrollTop ?? 0;\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n // Background\r\n if (this._isFocused) {\r\n if (this._focusedBackground) {\r\n context.fillStyle = this._isEnabled ? this._focusedBackground : this._disabledColor;\r\n\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n } else if (this._background) {\r\n context.fillStyle = this._isEnabled ? this._background : this._disabledColor;\r\n\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowBlur = 0;\r\n context.shadowOffsetX = 0;\r\n context.shadowOffsetY = 0;\r\n }\r\n\r\n // sets the color of the rectangle (border if background available)\r\n if (this.color) {\r\n context.fillStyle = this.color;\r\n }\r\n\r\n const height = this._currentMeasure.height;\r\n const width = this._currentMeasure.width;\r\n let rootY = 0;\r\n\r\n switch (this._textVerticalAlignment) {\r\n case Control.VERTICAL_ALIGNMENT_TOP:\r\n rootY = this._fontOffset.ascent;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\r\n rootY = height - this._fontOffset.height * (this._lines.length - 1) - this._fontOffset.descent;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_CENTER:\r\n rootY = this._fontOffset.ascent + (height - this._fontOffset.height * this._lines.length) / 2;\r\n break;\r\n }\r\n\r\n context.save();\r\n context.beginPath();\r\n context.fillStyle = this.fontStyle;\r\n if (!this._textWrapper.text && this.placeholderText) {\r\n context.fillStyle = this._placeholderColor;\r\n }\r\n // here we define the visible reactangle to clip it in next line\r\n context.rect(this._clipTextLeft, this._clipTextTop, this._availableWidth + 2, this._availableHeight + 2);\r\n context.clip();\r\n\r\n // Text\r\n rootY += this._scrollTop;\r\n\r\n for (let i = 0; i < this._lines.length; i++) {\r\n const line = this._lines[i];\r\n\r\n if (i !== 0 && this._lineSpacing.internalValue !== 0) {\r\n if (this._lineSpacing.isPixel) {\r\n rootY += this._lineSpacing.getValue(this._host);\r\n } else {\r\n rootY = rootY + this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n }\r\n\r\n this._drawText(line.text, line.width, rootY, context);\r\n rootY += this._fontOffset.height;\r\n }\r\n\r\n context.restore();\r\n\r\n // Cursor\r\n if (this._isFocused) {\r\n // Render cursor\r\n if (!this._blinkIsEven || this._isTextHighlightOn) {\r\n let cursorLeft =\r\n this._scrollLeft + context.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substring(0, this._cursorInfo.relativeStartIndex)).width;\r\n\r\n if (cursorLeft < this._clipTextLeft) {\r\n this._scrollLeft += this._clipTextLeft - cursorLeft;\r\n cursorLeft = this._clipTextLeft;\r\n this._markAsDirty();\r\n } else if (cursorLeft > this._clipTextLeft + this._availableWidth) {\r\n this._scrollLeft += this._clipTextLeft + this._availableWidth - cursorLeft;\r\n cursorLeft = this._clipTextLeft + this._availableWidth;\r\n this._markAsDirty();\r\n }\r\n\r\n let cursorTop = this._scrollTop + this._cursorInfo.currentLineIndex * this._fontOffset.height; //cursorTop distance from top to cursor start\r\n\r\n if (cursorTop < this._clipTextTop) {\r\n this._scrollTop += this._clipTextTop - cursorTop;\r\n cursorTop = this._clipTextTop;\r\n this._markAsDirty();\r\n } else if (cursorTop + this._fontOffset.height > this._clipTextTop + this._availableHeight && this._availableHeight > this._fontOffset.height) {\r\n this._scrollTop += this._clipTextTop + this._availableHeight - cursorTop - this._fontOffset.height;\r\n cursorTop = this._clipTextTop + this._availableHeight - this._fontOffset.height;\r\n this._markAsDirty();\r\n }\r\n\r\n if (!this._isTextHighlightOn) {\r\n context.fillRect(cursorLeft, cursorTop, 2, this._fontOffset.height);\r\n }\r\n }\r\n\r\n this._resetBlinking();\r\n\r\n //show the highlighted text\r\n if (this._isTextHighlightOn) {\r\n clearTimeout(this._blinkTimeout);\r\n\r\n this._highlightedText = this.text.substring(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n context.globalAlpha = this._highligherOpacity;\r\n context.fillStyle = this._textHighlightColor;\r\n\r\n const startLineIndex = Math.min(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);\r\n const endLineIndex = Math.max(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);\r\n\r\n let highlightRootY = this._scrollTop + startLineIndex * this._fontOffset.height;\r\n\r\n for (let i = startLineIndex; i <= endLineIndex; i++) {\r\n const line = this._lines[i];\r\n\r\n let highlightRootX = this._scrollLeft as number;\r\n switch (this._textHorizontalAlignment) {\r\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\r\n highlightRootX += 0;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\r\n highlightRootX += width - line.width;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\r\n highlightRootX += (width - line.width) / 2;\r\n break;\r\n }\r\n\r\n const begin = i === startLineIndex ? this._cursorInfo.relativeStartIndex : 0;\r\n const end = i === endLineIndex ? this._cursorInfo.relativeEndIndex : line.text.length;\r\n\r\n const leftOffsetWidth = context.measureText(line.text.substring(0, begin)).width;\r\n const selectedText = line.text.substring(begin, end);\r\n const hightlightWidth = context.measureText(selectedText).width;\r\n\r\n context.fillRect(highlightRootX + leftOffsetWidth, highlightRootY, hightlightWidth, this._fontOffset.height);\r\n\r\n highlightRootY += this._fontOffset.height;\r\n }\r\n\r\n if (this._cursorInfo.globalEndIndex === this._cursorInfo.globalStartIndex) {\r\n this._resetBlinking();\r\n }\r\n }\r\n }\r\n\r\n context.restore();\r\n\r\n // Border\r\n if (this._thickness) {\r\n if (this._isFocused) {\r\n if (this.focusedColor) {\r\n context.strokeStyle = this.focusedColor;\r\n }\r\n } else {\r\n if (this.color) {\r\n context.strokeStyle = this.color;\r\n }\r\n }\r\n\r\n context.lineWidth = this._thickness;\r\n\r\n context.strokeRect(\r\n this._currentMeasure.left + this._thickness / 2,\r\n this._currentMeasure.top + this._thickness / 2,\r\n this._currentMeasure.width - this._thickness,\r\n this._currentMeasure.height - this._thickness\r\n );\r\n }\r\n }\r\n\r\n private _resetBlinking() {\r\n clearTimeout(this._blinkTimeout);\r\n this._blinkTimeout = <any>setTimeout(() => {\r\n this._blinkIsEven = !this._blinkIsEven;\r\n this._markAsDirty();\r\n }, 500);\r\n }\r\n\r\n public override _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean {\r\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\r\n return false;\r\n }\r\n\r\n if (this.isReadOnly) {\r\n return true;\r\n }\r\n\r\n this._clickedCoordinateX = coordinates.x;\r\n this._clickedCoordinateY = coordinates.y;\r\n\r\n this._isTextHighlightOn = false;\r\n this._highlightedText = \"\";\r\n this._isPointerDown = true;\r\n this._host._capturingControl[pointerId] = this;\r\n if (this._host.focusedControl === this) {\r\n // Move cursor\r\n clearTimeout(this._blinkTimeout);\r\n this._markAsDirty();\r\n return true;\r\n }\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n this._host.focusedControl = this;\r\n\r\n return true;\r\n }\r\n\r\n // for textselection\r\n public override _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void {\r\n // Avoid Chromium-like beahavior when this event is fired right after onPointerDown\r\n if (pi.event.movementX === 0 && pi.event.movementY === 0) {\r\n return;\r\n }\r\n\r\n if (this._host.focusedControl === this && this._isPointerDown && !this.isReadOnly) {\r\n this._clickedCoordinateX = coordinates.x;\r\n this._clickedCoordinateY = coordinates.y;\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n\r\n this._isTextHighlightOn = true;\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n super._onPointerMove(target, coordinates, pointerId, pi);\r\n }\r\n\r\n /**\r\n * Apply the correct position of cursor according to current modification\r\n */\r\n private _updateCursorPosition() {\r\n if (!this._isFocused) {\r\n return;\r\n }\r\n\r\n if (!this._textWrapper.text && this.placeholderText) {\r\n this._cursorInfo.currentLineIndex = 0;\r\n this._cursorInfo.globalStartIndex = 0;\r\n this._cursorInfo.globalEndIndex = 0;\r\n this._cursorInfo.relativeStartIndex = 0;\r\n this._cursorInfo.relativeEndIndex = 0;\r\n } else {\r\n if (this._clickedCoordinateX && this._clickedCoordinateY) {\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo = {\r\n globalStartIndex: 0,\r\n globalEndIndex: 0,\r\n relativeStartIndex: 0,\r\n relativeEndIndex: 0,\r\n currentLineIndex: 0,\r\n };\r\n }\r\n\r\n let globalIndex = 0;\r\n let relativeIndex = 0;\r\n\r\n const lastClickedCoordinateY = this._clickedCoordinateY - (this._scrollTop as number);\r\n\r\n const relativeCoordinateY = Math.floor(lastClickedCoordinateY / this._fontOffset.height);\r\n this._cursorInfo.currentLineIndex = Math.min(Math.max(relativeCoordinateY, 0), this._lines.length - 1);\r\n\r\n let currentSize = 0;\r\n\r\n const relativeXPosition = this._clickedCoordinateX - (this._scrollLeft ?? 0);\r\n\r\n let previousDist = 0;\r\n\r\n for (let index = 0; index < this._cursorInfo.currentLineIndex; index++) {\r\n const line = this._lines[index];\r\n globalIndex += line.text.length + line.lineEnding.length;\r\n }\r\n\r\n while (currentSize < relativeXPosition && this._lines[this._cursorInfo.currentLineIndex].text.length > relativeIndex) {\r\n relativeIndex++;\r\n previousDist = Math.abs(relativeXPosition - currentSize);\r\n currentSize = this._contextForBreakLines.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substring(0, relativeIndex)).width;\r\n }\r\n\r\n // Find closest move\r\n if (Math.abs(relativeXPosition - currentSize) > previousDist && relativeIndex > 0) {\r\n relativeIndex--;\r\n }\r\n\r\n globalIndex += relativeIndex;\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = globalIndex;\r\n this._cursorInfo.relativeStartIndex = relativeIndex;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;\r\n } else {\r\n if (globalIndex < this._highlightCursorInfo.initialStartIndex) {\r\n this._cursorInfo.globalStartIndex = globalIndex;\r\n this._cursorInfo.relativeStartIndex = relativeIndex;\r\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\r\n this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;\r\n } else {\r\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\r\n this._cursorInfo.relativeStartIndex = this._highlightCursorInfo.initialRelativeStartIndex;\r\n this._cursorInfo.globalEndIndex = globalIndex;\r\n this._cursorInfo.relativeEndIndex = relativeIndex;\r\n }\r\n }\r\n\r\n // Avoid the caret during highlighting\r\n this._blinkIsEven = this._isTextHighlightOn;\r\n this._clickedCoordinateX = null;\r\n this._clickedCoordinateY = null;\r\n } else {\r\n // Standard behavior same as Current line is at least above the initial highlight index\r\n this._cursorInfo.relativeStartIndex = 0;\r\n this._cursorInfo.currentLineIndex = 0;\r\n\r\n let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n let tmpLength = 0;\r\n\r\n while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {\r\n tmpLength += lineLength;\r\n\r\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\r\n this._cursorInfo.currentLineIndex++;\r\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n }\r\n }\r\n\r\n this._cursorInfo.relativeStartIndex = this._cursorInfo.globalStartIndex - tmpLength;\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n } else if (this._highlightCursorInfo.initialStartIndex !== -1 && this._cursorInfo.globalStartIndex >= this._highlightCursorInfo.initialStartIndex) {\r\n // Current line is at least below the initial highlight index\r\n while (tmpLength + lineLength <= this._cursorInfo.globalEndIndex) {\r\n tmpLength += lineLength;\r\n\r\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\r\n this._cursorInfo.currentLineIndex++;\r\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n }\r\n }\r\n\r\n this._cursorInfo.relativeEndIndex = this._cursorInfo.globalEndIndex - tmpLength;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Update all values of cursor information based on cursorIndex value\r\n *\r\n * @param offset The index to take care of\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected override _updateValueFromCursorIndex(offset: number) {\r\n // Override to avoid parent behavior during _onPointerMove\r\n }\r\n\r\n /**\r\n * Select the word immediatly under the cursor on double click\r\n *\r\n * @param _evt Pointer informations of double click\r\n * @internal\r\n */\r\n protected override _processDblClick(_evt: PointerInfo) {\r\n //pre-find the start and end index of the word under cursor, speeds up the rendering\r\n let moveLeft, moveRight;\r\n do {\r\n moveLeft = this._cursorInfo.globalStartIndex > 0 && this._textWrapper.isWord(this._cursorInfo.globalStartIndex - 1) ? --this._cursorInfo.globalStartIndex : 0;\r\n moveRight =\r\n this._cursorInfo.globalEndIndex < this._textWrapper.length && this._textWrapper.isWord(this._cursorInfo.globalEndIndex) ? ++this._cursorInfo.globalEndIndex : 0;\r\n } while (moveLeft || moveRight);\r\n\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n\r\n this.onTextHighlightObservable.notifyObservers(this);\r\n\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n this._markAsDirty();\r\n }\r\n\r\n /** @internal */\r\n public override selectAllText() {\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n\r\n this._highlightCursorInfo = {\r\n initialStartIndex: 0,\r\n initialRelativeStartIndex: 0,\r\n initialLineIndex: 0,\r\n };\r\n\r\n this._cursorInfo = {\r\n globalStartIndex: 0,\r\n globalEndIndex: this._textWrapper.length,\r\n relativeEndIndex: this._lines[this._lines.length - 1].text.length,\r\n relativeStartIndex: 0,\r\n currentLineIndex: this._lines.length - 1,\r\n };\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n public override dispose() {\r\n super.dispose();\r\n\r\n this.onLinesReadyObservable.clear();\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.InputTextArea\", InputTextArea);\r\n"]}
1
+ {"version":3,"file":"inputTextArea.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/inputTextArea.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxC,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAEjD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,SAAS;IAkCxC,wGAAwG;IAExG,IAAW,iBAAiB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAED,IAAW,iBAAiB,CAAC,KAAc;QACvC,IAAI,IAAI,CAAC,kBAAkB,KAAK,KAAK,EAAE,CAAC;YACpC,OAAO;QACX,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,IAAoB,MAAM,CAAC,KAAsB;QAC7C,IAAI,CAAC,uBAAuB,GAAG,KAAK,CAAC;QAErC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;YAC9C,OAAO;QACX,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,YAAY,EAAE,CAAC;QACxB,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;IACpC,CAAC;IAGD,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAA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AC;QACzB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,gBAAgB;IACA,aAAa;QACzB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAEzB,IAAI,CAAC,oBAAoB,GAAG;YACxB,iBAAiB,EAAE,CAAC;YACpB,yBAAyB,EAAE,CAAC;YAC5B,gBAAgB,EAAE,CAAC;SACtB,CAAC;QAEF,IAAI,CAAC,WAAW,GAAG;YACf,gBAAgB,EAAE,CAAC;YACnB,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM;YACxC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;YACjE,kBAAkB,EAAE,CAAC;YACrB,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;SAC3C,CAAC;QAEF,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAEe,OAAO;QACnB,KAAK,CAAC,OAAO,EAAE,CAAC;QAEhB,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;CACJ;AA1oCG;IADC,SAAS,EAAE;sDAGX;AA0BD;IADC,SAAS,EAAE;8CAGX;AA6mCL,aAAa,CAAC,2BAA2B,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport type { Vector2 } from \"core/Maths/math.vector\";\r\n\r\nimport { Control } from \"./control\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport type { VirtualKeyboard } from \"./virtualKeyboard\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { Measure } from \"../measure\";\r\nimport { InputText } from \"./inputText\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport type { PointerInfo, PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport type { IKeyboardEvent } from \"core/Events/deviceInputEvents\";\r\n\r\nimport { serialize } from \"core/Misc/decorators\";\r\n\r\n/**\r\n * Class used to create input text control\r\n */\r\nexport class InputTextArea extends InputText {\r\n private _textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n private _textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n\r\n private _prevText: string = this.text;\r\n\r\n private _lines: any[];\r\n private _lineSpacing: ValueAndUnit = new ValueAndUnit(0);\r\n private _maxHeight = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);\r\n\r\n private _clipTextTop: number;\r\n private _clipTextLeft: number;\r\n\r\n private _cursorInfo: { globalStartIndex: number; globalEndIndex: number; relativeStartIndex: number; relativeEndIndex: number; currentLineIndex: number };\r\n private _highlightCursorInfo: { initialStartIndex: number; initialRelativeStartIndex: number; initialLineIndex: number };\r\n\r\n /**\r\n * An event triggered after the text was broken up into lines\r\n */\r\n public onLinesReadyObservable = new Observable<InputTextArea>();\r\n\r\n /** @internal */\r\n public override _connectedVirtualKeyboard: Nullable<VirtualKeyboard>;\r\n private _contextForBreakLines: ICanvasRenderingContext;\r\n private _clickedCoordinateX: Nullable<number>;\r\n private _clickedCoordinateY: Nullable<number>;\r\n\r\n private _availableWidth: number;\r\n private _availableHeight: number;\r\n\r\n private _scrollTop: Nullable<number>;\r\n\r\n private _autoStretchHeight: boolean;\r\n\r\n /** Gets or sets a boolean indicating if the control can auto stretch its height to adapt to the text */\r\n @serialize()\r\n public get autoStretchHeight(): boolean {\r\n return this._autoStretchHeight;\r\n }\r\n\r\n public set autoStretchHeight(value: boolean) {\r\n if (this._autoStretchHeight === value) {\r\n return;\r\n }\r\n\r\n this._autoStretchHeight = value;\r\n this._markAsDirty();\r\n }\r\n\r\n public override set height(value: string | number) {\r\n this.fixedRatioMasterIsWidth = false;\r\n\r\n if (this._height.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._height.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n\r\n this._autoStretchHeight = false;\r\n }\r\n\r\n @serialize()\r\n public get maxHeight(): string | number {\r\n return this._maxHeight.toString(this._host);\r\n }\r\n\r\n /** Gets the maximum width allowed by the control in pixels */\r\n public get maxHeightInPixels(): number {\r\n return this._maxHeight.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n\r\n public set maxHeight(value: string | number) {\r\n if (this._maxHeight.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._maxHeight.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new InputTextArea\r\n * @param name defines the control name\r\n * @param text defines the text of the control\r\n */\r\n constructor(\r\n public override name?: string,\r\n text: string = \"\"\r\n ) {\r\n super(name);\r\n\r\n this.text = text;\r\n\r\n this.isPointerBlocker = true;\r\n\r\n this.onLinesReadyObservable.add(() => this._updateCursorPosition());\r\n\r\n this._highlightCursorInfo = {\r\n initialStartIndex: -1,\r\n initialRelativeStartIndex: -1,\r\n initialLineIndex: -1,\r\n };\r\n\r\n this._cursorInfo = {\r\n globalStartIndex: 0,\r\n globalEndIndex: 0,\r\n relativeEndIndex: 0,\r\n relativeStartIndex: 0,\r\n currentLineIndex: 0,\r\n };\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"InputTextArea\";\r\n }\r\n\r\n /**\r\n * Handles the keyboard event\r\n * @param evt Defines the KeyboardEvent\r\n */\r\n public override processKeyboard(evt: IKeyboardEvent): void {\r\n if (this.isReadOnly) {\r\n return;\r\n }\r\n\r\n // process pressed key\r\n this.alternativeProcessKey(evt.code, evt.key, evt);\r\n\r\n this.onKeyboardEventProcessedObservable.notifyObservers(evt);\r\n }\r\n\r\n /**\r\n * Process the last keyboard input\r\n *\r\n * @param code The ascii input number\r\n * @param key The key string representation\r\n * @param evt The keyboard event emits with input\r\n * @internal\r\n */\r\n public alternativeProcessKey(code: string, key?: string, evt?: IKeyboardEvent) {\r\n //return if clipboard event keys (i.e -ctr/cmd + c,v,x)\r\n if (evt && (evt.ctrlKey || evt.metaKey) && (key === \"c\" || key === \"v\" || key === \"x\")) {\r\n return;\r\n }\r\n\r\n // Specific cases\r\n switch (code) {\r\n case \"Period\": //SLASH\r\n if (evt && evt.shiftKey) {\r\n evt.preventDefault();\r\n }\r\n break;\r\n case \"Backspace\": // BACKSPACE\r\n if (!this._isTextHighlightOn && this._cursorInfo.globalStartIndex > 0) {\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalStartIndex--;\r\n }\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n if (evt) {\r\n evt.preventDefault();\r\n }\r\n\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n\r\n this._textHasChanged();\r\n break;\r\n case \"Delete\": // DELETE\r\n if (!this._isTextHighlightOn && this._cursorInfo.globalEndIndex < this.text.length) {\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex + 1;\r\n }\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n if (evt) {\r\n evt.preventDefault();\r\n }\r\n\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n\r\n this._textHasChanged();\r\n break;\r\n case \"NumpadEnter\": // NUMPAD ENTER\r\n case \"Enter\": // RETURN\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, \"\\n\");\r\n this._cursorInfo.globalStartIndex++;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n\r\n this._textHasChanged();\r\n return;\r\n case \"End\": // END\r\n this._cursorInfo.globalStartIndex = this.text.length;\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n this._markAsDirty();\r\n return;\r\n case \"Home\": // HOME\r\n this._cursorInfo.globalStartIndex = 0;\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n this._markAsDirty();\r\n return;\r\n case \"ArrowLeft\": // LEFT\r\n this._markAsDirty();\r\n\r\n if (evt && evt.shiftKey) {\r\n // shift + ctrl/cmd + <-\r\n if (evt.ctrlKey || evt.metaKey) {\r\n // Go to line's start by substract the relativeStartIndex to the globalStartIndex\r\n this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;\r\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\r\n }\r\n // store the starting point\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalStartIndex--;\r\n this._isTextHighlightOn = true;\r\n } else {\r\n if (this._cursorInfo.globalEndIndex > this._highlightCursorInfo.initialStartIndex) {\r\n this._cursorInfo.globalEndIndex--;\r\n } else {\r\n this._cursorInfo.globalStartIndex--;\r\n }\r\n }\r\n this._blinkIsEven = true;\r\n evt.preventDefault();\r\n return;\r\n }\r\n\r\n if (this._isTextHighlightOn) {\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n } else if (evt && (evt.ctrlKey || evt.metaKey)) {\r\n // ctr + <-\r\n this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;\r\n evt.preventDefault();\r\n } else if (this._cursorInfo.globalStartIndex > 0) {\r\n this._cursorInfo.globalStartIndex--;\r\n }\r\n\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n return;\r\n case \"ArrowRight\": // RIGHT\r\n this._markAsDirty();\r\n\r\n if (evt && evt.shiftKey) {\r\n // shift + ctrl/cmd + ->\r\n if (evt.ctrlKey || evt.metaKey) {\r\n const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex - 1;\r\n this._cursorInfo.globalEndIndex += rightDelta;\r\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\r\n }\r\n // store the starting point\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalEndIndex++;\r\n this._isTextHighlightOn = true;\r\n } else {\r\n if (this._cursorInfo.globalStartIndex < this._highlightCursorInfo.initialStartIndex) {\r\n this._cursorInfo.globalStartIndex++;\r\n } else {\r\n this._cursorInfo.globalEndIndex++;\r\n }\r\n }\r\n this._blinkIsEven = true;\r\n evt.preventDefault();\r\n return;\r\n }\r\n if (this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex;\r\n } else if (evt && (evt.ctrlKey || evt.metaKey)) {\r\n //ctr + ->\r\n const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex;\r\n this._cursorInfo.globalStartIndex += rightDelta;\r\n } else if (this._cursorInfo.globalStartIndex < this.text.length) {\r\n this._cursorInfo.globalStartIndex++;\r\n }\r\n\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n this._isTextHighlightOn = false;\r\n return;\r\n case \"ArrowUp\": // UP\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n\r\n if (evt) {\r\n if (evt.shiftKey) {\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n }\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n } else {\r\n this._isTextHighlightOn = false;\r\n }\r\n evt.preventDefault();\r\n }\r\n\r\n if (this._cursorInfo.currentLineIndex === 0) {\r\n // First line\r\n this._cursorInfo.globalStartIndex = 0;\r\n } else {\r\n const currentLine = this._lines[this._cursorInfo.currentLineIndex];\r\n const upperLine = this._lines[this._cursorInfo.currentLineIndex - 1];\r\n\r\n let tmpIndex = 0;\r\n let relativeIndex = 0;\r\n if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\r\n tmpIndex = this._cursorInfo.globalStartIndex;\r\n relativeIndex = this._cursorInfo.relativeStartIndex;\r\n } else {\r\n tmpIndex = this._cursorInfo.globalEndIndex;\r\n relativeIndex = this._cursorInfo.relativeEndIndex;\r\n }\r\n\r\n const currentText = currentLine.text.substring(0, relativeIndex);\r\n const currentWidth = this._contextForBreakLines.measureText(currentText).width;\r\n\r\n let upperWidth = 0;\r\n let previousWidth = 0;\r\n\r\n tmpIndex -= relativeIndex; // Start of current line\r\n tmpIndex -= upperLine.text.length + upperLine.lineEnding.length; // Start of upper line\r\n let upperLineRelativeIndex = 0;\r\n\r\n while (upperWidth < currentWidth && upperLineRelativeIndex < upperLine.text.length) {\r\n tmpIndex++;\r\n upperLineRelativeIndex++;\r\n previousWidth = Math.abs(currentWidth - upperWidth);\r\n upperWidth = this._contextForBreakLines.measureText(upperLine.text.substring(0, upperLineRelativeIndex)).width;\r\n }\r\n\r\n // Find closest move\r\n if (Math.abs(currentWidth - upperWidth) > previousWidth && upperLineRelativeIndex > 0) {\r\n tmpIndex--;\r\n }\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n } else if (this._cursorInfo.currentLineIndex <= this._highlightCursorInfo.initialLineIndex) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\r\n this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;\r\n } else {\r\n this._cursorInfo.globalEndIndex = tmpIndex;\r\n }\r\n }\r\n\r\n this._markAsDirty();\r\n return;\r\n case \"ArrowDown\": // DOWN\r\n // update the cursor\r\n this._blinkIsEven = false;\r\n\r\n if (evt) {\r\n if (evt.shiftKey) {\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n }\r\n\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n } else {\r\n this._isTextHighlightOn = false;\r\n }\r\n evt.preventDefault();\r\n }\r\n\r\n if (this._cursorInfo.currentLineIndex === this._lines.length - 1) {\r\n // Last line\r\n this._cursorInfo.globalStartIndex = this.text.length;\r\n } else {\r\n const currentLine = this._lines[this._cursorInfo.currentLineIndex];\r\n const underLine = this._lines[this._cursorInfo.currentLineIndex + 1];\r\n\r\n let tmpIndex = 0;\r\n let relativeIndex = 0;\r\n if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\r\n tmpIndex = this._cursorInfo.globalStartIndex;\r\n relativeIndex = this._cursorInfo.relativeStartIndex;\r\n } else {\r\n tmpIndex = this._cursorInfo.globalEndIndex;\r\n relativeIndex = this._cursorInfo.relativeEndIndex;\r\n }\r\n\r\n const currentText = currentLine.text.substring(0, relativeIndex);\r\n const currentWidth = this._contextForBreakLines.measureText(currentText).width;\r\n\r\n let underWidth = 0;\r\n let previousWidth = 0;\r\n\r\n tmpIndex += currentLine.text.length - relativeIndex + currentLine.lineEnding.length; // Start of current line\r\n let underLineRelativeIndex = 0;\r\n\r\n while (underWidth < currentWidth && underLineRelativeIndex < underLine.text.length) {\r\n tmpIndex++;\r\n underLineRelativeIndex++;\r\n previousWidth = Math.abs(currentWidth - underWidth);\r\n underWidth = this._contextForBreakLines.measureText(underLine.text.substring(0, underLineRelativeIndex)).width;\r\n }\r\n\r\n // Find closest move\r\n if (Math.abs(currentWidth - underWidth) > previousWidth && underLineRelativeIndex > 0) {\r\n tmpIndex--;\r\n }\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n } else if (this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {\r\n this._cursorInfo.globalStartIndex = tmpIndex;\r\n if (this._cursorInfo.globalStartIndex > this._cursorInfo.globalEndIndex) {\r\n this._cursorInfo.globalEndIndex += this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.globalEndIndex -= this._cursorInfo.globalStartIndex;\r\n }\r\n } else {\r\n this._cursorInfo.globalEndIndex = tmpIndex;\r\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\r\n }\r\n }\r\n\r\n this._markAsDirty();\r\n return;\r\n }\r\n\r\n // special case - select all. Use key instead of code to support all keyboard layouts\r\n if (key === \"a\" && evt && (evt.ctrlKey || evt.metaKey)) {\r\n this.selectAllText();\r\n evt.preventDefault();\r\n return;\r\n }\r\n\r\n // Printable characters\r\n if (key?.length === 1) {\r\n evt?.preventDefault();\r\n this._currentKey = key;\r\n this.onBeforeKeyAddObservable.notifyObservers(this);\r\n key = this._currentKey;\r\n if (this._addKey) {\r\n this._isTextHighlightOn = false;\r\n this._blinkIsEven = false;\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, key);\r\n this._cursorInfo.globalStartIndex += key.length;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n\r\n this._textHasChanged();\r\n }\r\n }\r\n }\r\n\r\n protected _parseLineWordWrap(line: string = \"\", width: number, context: ICanvasRenderingContext): { text: string; width: number; lineEnding: string }[] {\r\n const lines = [];\r\n const words = line.split(\" \");\r\n let lineWidth = 0;\r\n\r\n for (let n = 0; n < words.length; n++) {\r\n const testLine = n > 0 ? line + \" \" + words[n] : words[0];\r\n const metrics = context.measureText(testLine);\r\n const testWidth = metrics.width;\r\n if (testWidth > width) {\r\n if (n > 0) {\r\n // Avoid first word duplication if of too long\r\n lineWidth = context.measureText(line).width;\r\n lines.push({ text: line, width: lineWidth, lineEnding: \" \" });\r\n }\r\n\r\n line = words[n];\r\n\r\n let flushedLine = \"\";\r\n\r\n line.split(\"\").map((char) => {\r\n if (context.measureText(flushedLine + char).width > width) {\r\n lines.push({ text: flushedLine, width: context.measureText(flushedLine).width, lineEnding: \"\" });\r\n flushedLine = \"\";\r\n }\r\n flushedLine += char;\r\n });\r\n\r\n line = flushedLine;\r\n // Measure remaining characters\r\n lineWidth = context.measureText(line).width;\r\n } else {\r\n lineWidth = testWidth;\r\n line = testLine;\r\n }\r\n }\r\n lines.push({ text: line, width: lineWidth, lineEnding: \" \" });\r\n\r\n return lines;\r\n }\r\n\r\n protected _breakLines(refWidth: number, context: ICanvasRenderingContext): object[] {\r\n const lines: { text: string; width: number; lineEnding: string }[] = [];\r\n const _lines = (this.text || this.placeholderText).split(\"\\n\");\r\n\r\n if (this.clipContent) {\r\n for (const _line of _lines) {\r\n lines.push(...this._parseLineWordWrap(_line, refWidth, context));\r\n }\r\n } else {\r\n for (const _line of _lines) {\r\n lines.push(this._parseLine(_line, context));\r\n }\r\n }\r\n\r\n lines[lines.length - 1].lineEnding = \"\\n\";\r\n\r\n return lines;\r\n }\r\n\r\n protected _parseLine(line: string = \"\", context: ICanvasRenderingContext): { text: string; width: number; lineEnding: string } {\r\n return { text: line, width: context.measureText(line).width, lineEnding: \" \" };\r\n }\r\n\r\n /**\r\n * Processing of child right before the parent measurement update\r\n *\r\n * @param parentMeasure The parent measure\r\n * @param context The rendering canvas\r\n * @internal\r\n */\r\n protected override _preMeasure(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n if (!this._fontOffset || this._wasDirty) {\r\n this._fontOffset = Control._GetFontOffset(context.font, this._host.getScene()?.getEngine());\r\n }\r\n\r\n let text = this._beforeRenderText(this._textWrapper).text;\r\n\r\n // placeholder conditions and color setting\r\n if (!this.text && this._placeholderText) {\r\n text = this._placeholderText;\r\n }\r\n\r\n // measures the textlength -> this.measure.width\r\n this._textWidth = context.measureText(text).width;\r\n // we double up the margin width\r\n const marginWidth = this._margin.getValueInPixel(this._host, parentMeasure.width) * 2;\r\n\r\n if (this._autoStretchWidth) {\r\n const tmpLines = text.split(\"\\n\");\r\n const longerString = tmpLines.reduce((acc: string, val: string) => {\r\n const valueLength = context.measureText(val).width;\r\n const accLength = context.measureText(acc).width;\r\n return valueLength > accLength ? val : acc;\r\n }, \"\");\r\n\r\n const longerStringWidth = context.measureText(longerString).width;\r\n this.width = Math.min(this._maxWidth.getValueInPixel(this._host, parentMeasure.width), longerStringWidth + marginWidth) + \"px\";\r\n\r\n this.autoStretchWidth = true;\r\n }\r\n\r\n this._availableWidth = this._width.getValueInPixel(this._host, parentMeasure.width) - marginWidth;\r\n\r\n // Prepare lines\r\n this._lines = this._breakLines(this._availableWidth, context);\r\n // can we find a cleaner implementation here?\r\n this._contextForBreakLines = context;\r\n\r\n if (this._autoStretchHeight) {\r\n const textHeight = this._lines.length * this._fontOffset.height;\r\n const totalHeight = textHeight + this._margin.getValueInPixel(this._host, parentMeasure.height) * 2;\r\n this.height = Math.min(this._maxHeight.getValueInPixel(this._host, parentMeasure.height), totalHeight) + \"px\";\r\n\r\n this._autoStretchHeight = true;\r\n }\r\n\r\n this._availableHeight = this._height.getValueInPixel(this._host, parentMeasure.height) - marginWidth;\r\n\r\n if (this._isFocused) {\r\n this._cursorInfo.currentLineIndex = 0;\r\n\r\n let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n let tmpLength = 0;\r\n\r\n while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {\r\n tmpLength += lineLength;\r\n\r\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\r\n this._cursorInfo.currentLineIndex++;\r\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n }\r\n }\r\n }\r\n }\r\n\r\n protected override _textHasChanged() {\r\n if (!this._prevText && this._textWrapper.text && this.placeholderText) {\r\n this._cursorInfo.currentLineIndex = 0;\r\n this._cursorInfo.globalStartIndex = 1;\r\n this._cursorInfo.globalEndIndex = 1;\r\n this._cursorInfo.relativeStartIndex = 1;\r\n this._cursorInfo.relativeEndIndex = 1;\r\n }\r\n super._textHasChanged();\r\n }\r\n\r\n private _computeScroll() {\r\n this._clipTextLeft = this._currentMeasure.left + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.width);\r\n this._clipTextTop = this._currentMeasure.top + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n\r\n if (this._isFocused && this._lines[this._cursorInfo.currentLineIndex].width > this._availableWidth) {\r\n const textLeft = this._clipTextLeft - this._lines[this._cursorInfo.currentLineIndex].width + this._availableWidth;\r\n\r\n if (!this._scrollLeft) {\r\n this._scrollLeft = textLeft;\r\n }\r\n } else {\r\n this._scrollLeft = this._clipTextLeft;\r\n }\r\n\r\n if (this._isFocused) {\r\n const selectedHeight = (this._cursorInfo.currentLineIndex + 1) * this._fontOffset.height;\r\n const textTop = this._clipTextTop - selectedHeight;\r\n\r\n if (!this._scrollTop) {\r\n this._scrollTop = textTop;\r\n }\r\n } else {\r\n this._scrollTop = this._clipTextTop;\r\n }\r\n }\r\n\r\n /**\r\n * Processing of child after the parent measurement update\r\n *\r\n * @internal\r\n */\r\n protected override _additionalProcessing(): void {\r\n // Flush the highlighted text each frame\r\n this.highlightedText = \"\";\r\n\r\n this.onLinesReadyObservable.notifyObservers(this);\r\n }\r\n\r\n private _drawText(text: string, textWidth: number, y: number, context: ICanvasRenderingContext): void {\r\n const width = this._currentMeasure.width;\r\n let x = this._scrollLeft as number;\r\n switch (this._textHorizontalAlignment) {\r\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\r\n x += 0;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\r\n x += width - textWidth;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\r\n x += (width - textWidth) / 2;\r\n break;\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n if (this.outlineWidth) {\r\n context.strokeText(text, this._currentMeasure.left + x, y);\r\n }\r\n context.fillText(text, x, y);\r\n }\r\n\r\n /**\r\n * Copy the text in the clipboard\r\n *\r\n * @param ev The clipboard event\r\n * @internal\r\n */\r\n protected override _onCopyText(ev: ClipboardEvent): void {\r\n this._isTextHighlightOn = false;\r\n //when write permission to clipbaord data is denied\r\n try {\r\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\r\n } catch {} //pass\r\n this._host.clipboardData = this._highlightedText;\r\n }\r\n\r\n /**\r\n * Cut the text and copy it in the clipboard\r\n *\r\n * @param ev The clipboard event\r\n * @internal\r\n */\r\n protected override _onCutText(ev: ClipboardEvent): void {\r\n if (!this._highlightedText) {\r\n return;\r\n }\r\n //when write permission to clipbaord data is denied\r\n try {\r\n ev.clipboardData && ev.clipboardData.setData(\"text/plain\", this._highlightedText);\r\n } catch {} //pass\r\n\r\n this._host.clipboardData = this._highlightedText;\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n this._textHasChanged();\r\n }\r\n\r\n /**\r\n * Paste the copied text from the clipboard\r\n *\r\n * @param ev The clipboard event\r\n * @internal\r\n */\r\n protected override _onPasteText(ev: ClipboardEvent): void {\r\n let data: string = \"\";\r\n if (ev.clipboardData && ev.clipboardData.types.indexOf(\"text/plain\") !== -1) {\r\n data = ev.clipboardData.getData(\"text/plain\");\r\n } else {\r\n //get the cached data; returns blank string by default\r\n data = this._host.clipboardData;\r\n }\r\n\r\n this._isTextHighlightOn = false;\r\n this._prevText = this._textWrapper.text;\r\n this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, data);\r\n\r\n const deltaIndex = data.length - (this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex);\r\n\r\n this._cursorInfo.globalStartIndex += deltaIndex;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._clickedCoordinateX = null;\r\n this._clickedCoordinateY = null;\r\n\r\n super._textHasChanged();\r\n }\r\n\r\n public override _draw(context: ICanvasRenderingContext): void {\r\n this._computeScroll();\r\n\r\n this._scrollLeft = this._scrollLeft ?? 0;\r\n this._scrollTop = this._scrollTop ?? 0;\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n // Background\r\n if (this._isFocused) {\r\n if (this._focusedBackground) {\r\n context.fillStyle = this._isEnabled ? this._focusedBackground : this._disabledColor;\r\n\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n } else if (this._background) {\r\n context.fillStyle = this._isEnabled ? this._background : this._disabledColor;\r\n\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowBlur = 0;\r\n context.shadowOffsetX = 0;\r\n context.shadowOffsetY = 0;\r\n }\r\n\r\n // sets the color of the rectangle (border if background available)\r\n if (this.color) {\r\n context.fillStyle = this.color;\r\n }\r\n\r\n const height = this._currentMeasure.height;\r\n const width = this._currentMeasure.width;\r\n let rootY = 0;\r\n\r\n switch (this._textVerticalAlignment) {\r\n case Control.VERTICAL_ALIGNMENT_TOP:\r\n rootY = this._fontOffset.ascent;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_BOTTOM:\r\n rootY = height - this._fontOffset.height * (this._lines.length - 1) - this._fontOffset.descent;\r\n break;\r\n case Control.VERTICAL_ALIGNMENT_CENTER:\r\n rootY = this._fontOffset.ascent + (height - this._fontOffset.height * this._lines.length) / 2;\r\n break;\r\n }\r\n\r\n context.save();\r\n context.beginPath();\r\n context.fillStyle = this.fontStyle;\r\n if (!this._textWrapper.text && this.placeholderText) {\r\n context.fillStyle = this._placeholderColor;\r\n }\r\n // here we define the visible reactangle to clip it in next line\r\n context.rect(this._clipTextLeft, this._clipTextTop, this._availableWidth + 2, this._availableHeight + 2);\r\n context.clip();\r\n\r\n // Text\r\n rootY += this._scrollTop;\r\n\r\n for (let i = 0; i < this._lines.length; i++) {\r\n const line = this._lines[i];\r\n\r\n if (i !== 0 && this._lineSpacing.internalValue !== 0) {\r\n if (this._lineSpacing.isPixel) {\r\n rootY += this._lineSpacing.getValue(this._host);\r\n } else {\r\n rootY = rootY + this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);\r\n }\r\n }\r\n\r\n this._drawText(line.text, line.width, rootY, context);\r\n rootY += this._fontOffset.height;\r\n }\r\n\r\n context.restore();\r\n\r\n // Cursor\r\n if (this._isFocused) {\r\n // Render cursor\r\n if (!this._blinkIsEven || this._isTextHighlightOn) {\r\n let cursorLeft =\r\n this._scrollLeft + context.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substring(0, this._cursorInfo.relativeStartIndex)).width;\r\n\r\n if (cursorLeft < this._clipTextLeft) {\r\n this._scrollLeft += this._clipTextLeft - cursorLeft;\r\n cursorLeft = this._clipTextLeft;\r\n this._markAsDirty();\r\n } else if (cursorLeft > this._clipTextLeft + this._availableWidth) {\r\n this._scrollLeft += this._clipTextLeft + this._availableWidth - cursorLeft;\r\n cursorLeft = this._clipTextLeft + this._availableWidth;\r\n this._markAsDirty();\r\n }\r\n\r\n let cursorTop = this._scrollTop + this._cursorInfo.currentLineIndex * this._fontOffset.height; //cursorTop distance from top to cursor start\r\n\r\n if (cursorTop < this._clipTextTop) {\r\n this._scrollTop += this._clipTextTop - cursorTop;\r\n cursorTop = this._clipTextTop;\r\n this._markAsDirty();\r\n } else if (cursorTop + this._fontOffset.height > this._clipTextTop + this._availableHeight && this._availableHeight > this._fontOffset.height) {\r\n this._scrollTop += this._clipTextTop + this._availableHeight - cursorTop - this._fontOffset.height;\r\n cursorTop = this._clipTextTop + this._availableHeight - this._fontOffset.height;\r\n this._markAsDirty();\r\n }\r\n\r\n if (!this._isTextHighlightOn) {\r\n context.fillRect(cursorLeft, cursorTop, 2, this._fontOffset.height);\r\n }\r\n }\r\n\r\n this._resetBlinking();\r\n\r\n //show the highlighted text\r\n if (this._isTextHighlightOn) {\r\n clearTimeout(this._blinkTimeout);\r\n\r\n this._highlightedText = this.text.substring(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);\r\n\r\n context.globalAlpha = this._highligherOpacity;\r\n context.fillStyle = this._textHighlightColor;\r\n\r\n const startLineIndex = Math.min(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);\r\n const endLineIndex = Math.max(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);\r\n\r\n let highlightRootY = this._scrollTop + startLineIndex * this._fontOffset.height;\r\n\r\n for (let i = startLineIndex; i <= endLineIndex; i++) {\r\n const line = this._lines[i];\r\n\r\n let highlightRootX = this._scrollLeft as number;\r\n switch (this._textHorizontalAlignment) {\r\n case Control.HORIZONTAL_ALIGNMENT_LEFT:\r\n highlightRootX += 0;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_RIGHT:\r\n highlightRootX += width - line.width;\r\n break;\r\n case Control.HORIZONTAL_ALIGNMENT_CENTER:\r\n highlightRootX += (width - line.width) / 2;\r\n break;\r\n }\r\n\r\n const begin = i === startLineIndex ? this._cursorInfo.relativeStartIndex : 0;\r\n const end = i === endLineIndex ? this._cursorInfo.relativeEndIndex : line.text.length;\r\n\r\n const leftOffsetWidth = context.measureText(line.text.substring(0, begin)).width;\r\n const selectedText = line.text.substring(begin, end);\r\n const hightlightWidth = context.measureText(selectedText).width;\r\n\r\n context.fillRect(highlightRootX + leftOffsetWidth, highlightRootY, hightlightWidth, this._fontOffset.height);\r\n\r\n highlightRootY += this._fontOffset.height;\r\n }\r\n\r\n if (this._cursorInfo.globalEndIndex === this._cursorInfo.globalStartIndex) {\r\n this._resetBlinking();\r\n }\r\n }\r\n }\r\n\r\n context.restore();\r\n\r\n // Border\r\n if (this._thickness) {\r\n if (this._isFocused) {\r\n if (this.focusedColor) {\r\n context.strokeStyle = this.focusedColor;\r\n }\r\n } else {\r\n if (this.color) {\r\n context.strokeStyle = this.color;\r\n }\r\n }\r\n\r\n context.lineWidth = this._thickness;\r\n\r\n context.strokeRect(\r\n this._currentMeasure.left + this._thickness / 2,\r\n this._currentMeasure.top + this._thickness / 2,\r\n this._currentMeasure.width - this._thickness,\r\n this._currentMeasure.height - this._thickness\r\n );\r\n }\r\n }\r\n\r\n private _resetBlinking() {\r\n clearTimeout(this._blinkTimeout);\r\n this._blinkTimeout = <any>setTimeout(() => {\r\n this._blinkIsEven = !this._blinkIsEven;\r\n this._markAsDirty();\r\n }, 500);\r\n }\r\n\r\n public override _onPointerDown(target: Control, coordinates: Vector2, pointerId: number, buttonIndex: number, pi: PointerInfoBase): boolean {\r\n if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {\r\n return false;\r\n }\r\n\r\n if (this.isReadOnly) {\r\n return true;\r\n }\r\n\r\n this._clickedCoordinateX = coordinates.x;\r\n this._clickedCoordinateY = coordinates.y;\r\n\r\n this._isTextHighlightOn = false;\r\n this._highlightedText = \"\";\r\n this._isPointerDown = true;\r\n this._host._capturingControl[pointerId] = this;\r\n if (this._host.focusedControl === this) {\r\n // Move cursor\r\n clearTimeout(this._blinkTimeout);\r\n this._markAsDirty();\r\n return true;\r\n }\r\n if (!this._isEnabled) {\r\n return false;\r\n }\r\n this._host.focusedControl = this;\r\n\r\n return true;\r\n }\r\n\r\n // for textselection\r\n public override _onPointerMove(target: Control, coordinates: Vector2, pointerId: number, pi: PointerInfoBase): void {\r\n // Avoid Chromium-like beahavior when this event is fired right after onPointerDown\r\n if (pi.event.movementX === 0 && pi.event.movementY === 0) {\r\n return;\r\n }\r\n\r\n if (this._host.focusedControl === this && this._isPointerDown && !this.isReadOnly) {\r\n this._clickedCoordinateX = coordinates.x;\r\n this._clickedCoordinateY = coordinates.y;\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;\r\n\r\n this._isTextHighlightOn = true;\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n super._onPointerMove(target, coordinates, pointerId, pi);\r\n }\r\n\r\n /**\r\n * Apply the correct position of cursor according to current modification\r\n */\r\n private _updateCursorPosition() {\r\n if (!this._isFocused) {\r\n return;\r\n }\r\n\r\n if (!this._textWrapper.text && this.placeholderText) {\r\n this._cursorInfo.currentLineIndex = 0;\r\n this._cursorInfo.globalStartIndex = 0;\r\n this._cursorInfo.globalEndIndex = 0;\r\n this._cursorInfo.relativeStartIndex = 0;\r\n this._cursorInfo.relativeEndIndex = 0;\r\n } else {\r\n if (this._clickedCoordinateX && this._clickedCoordinateY) {\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo = {\r\n globalStartIndex: 0,\r\n globalEndIndex: 0,\r\n relativeStartIndex: 0,\r\n relativeEndIndex: 0,\r\n currentLineIndex: 0,\r\n };\r\n }\r\n\r\n let globalIndex = 0;\r\n let relativeIndex = 0;\r\n\r\n const lastClickedCoordinateY = this._clickedCoordinateY - (this._scrollTop as number);\r\n\r\n const relativeCoordinateY = Math.floor(lastClickedCoordinateY / this._fontOffset.height);\r\n this._cursorInfo.currentLineIndex = Math.min(Math.max(relativeCoordinateY, 0), this._lines.length - 1);\r\n\r\n let currentSize = 0;\r\n\r\n const relativeXPosition = this._clickedCoordinateX - (this._scrollLeft ?? 0);\r\n\r\n let previousDist = 0;\r\n\r\n for (let index = 0; index < this._cursorInfo.currentLineIndex; index++) {\r\n const line = this._lines[index];\r\n globalIndex += line.text.length + line.lineEnding.length;\r\n }\r\n\r\n while (currentSize < relativeXPosition && this._lines[this._cursorInfo.currentLineIndex].text.length > relativeIndex) {\r\n relativeIndex++;\r\n previousDist = Math.abs(relativeXPosition - currentSize);\r\n currentSize = this._contextForBreakLines.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substring(0, relativeIndex)).width;\r\n }\r\n\r\n // Find closest move\r\n if (Math.abs(relativeXPosition - currentSize) > previousDist && relativeIndex > 0) {\r\n relativeIndex--;\r\n }\r\n\r\n globalIndex += relativeIndex;\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.globalStartIndex = globalIndex;\r\n this._cursorInfo.relativeStartIndex = relativeIndex;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;\r\n } else {\r\n if (globalIndex < this._highlightCursorInfo.initialStartIndex) {\r\n this._cursorInfo.globalStartIndex = globalIndex;\r\n this._cursorInfo.relativeStartIndex = relativeIndex;\r\n this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;\r\n this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;\r\n } else {\r\n this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;\r\n this._cursorInfo.relativeStartIndex = this._highlightCursorInfo.initialRelativeStartIndex;\r\n this._cursorInfo.globalEndIndex = globalIndex;\r\n this._cursorInfo.relativeEndIndex = relativeIndex;\r\n }\r\n }\r\n\r\n // Avoid the caret during highlighting\r\n this._blinkIsEven = this._isTextHighlightOn;\r\n this._clickedCoordinateX = null;\r\n this._clickedCoordinateY = null;\r\n } else {\r\n // Standard behavior same as Current line is at least above the initial highlight index\r\n this._cursorInfo.relativeStartIndex = 0;\r\n this._cursorInfo.currentLineIndex = 0;\r\n\r\n let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n let tmpLength = 0;\r\n\r\n while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {\r\n tmpLength += lineLength;\r\n\r\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\r\n this._cursorInfo.currentLineIndex++;\r\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n }\r\n }\r\n\r\n this._cursorInfo.relativeStartIndex = this._cursorInfo.globalStartIndex - tmpLength;\r\n\r\n if (!this._isTextHighlightOn) {\r\n this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;\r\n this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;\r\n } else if (this._highlightCursorInfo.initialStartIndex !== -1 && this._cursorInfo.globalStartIndex >= this._highlightCursorInfo.initialStartIndex) {\r\n // Current line is at least below the initial highlight index\r\n while (tmpLength + lineLength <= this._cursorInfo.globalEndIndex) {\r\n tmpLength += lineLength;\r\n\r\n if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {\r\n this._cursorInfo.currentLineIndex++;\r\n lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;\r\n }\r\n }\r\n\r\n this._cursorInfo.relativeEndIndex = this._cursorInfo.globalEndIndex - tmpLength;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Update all values of cursor information based on cursorIndex value\r\n *\r\n * @param offset The index to take care of\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected override _updateValueFromCursorIndex(offset: number) {\r\n // Override to avoid parent behavior during _onPointerMove\r\n }\r\n\r\n /**\r\n * Select the word immediatly under the cursor on double click\r\n *\r\n * @param _evt Pointer informations of double click\r\n * @internal\r\n */\r\n protected override _processDblClick(_evt: PointerInfo) {\r\n //pre-find the start and end index of the word under cursor, speeds up the rendering\r\n let moveLeft, moveRight;\r\n do {\r\n moveLeft = this._cursorInfo.globalStartIndex > 0 && this._textWrapper.isWord(this._cursorInfo.globalStartIndex - 1) ? --this._cursorInfo.globalStartIndex : 0;\r\n moveRight =\r\n this._cursorInfo.globalEndIndex < this._textWrapper.length && this._textWrapper.isWord(this._cursorInfo.globalEndIndex) ? ++this._cursorInfo.globalEndIndex : 0;\r\n } while (moveLeft || moveRight);\r\n\r\n this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;\r\n this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;\r\n\r\n this.onTextHighlightObservable.notifyObservers(this);\r\n\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n this._markAsDirty();\r\n }\r\n\r\n /** @internal */\r\n public override selectAllText() {\r\n this._isTextHighlightOn = true;\r\n this._blinkIsEven = true;\r\n\r\n this._highlightCursorInfo = {\r\n initialStartIndex: 0,\r\n initialRelativeStartIndex: 0,\r\n initialLineIndex: 0,\r\n };\r\n\r\n this._cursorInfo = {\r\n globalStartIndex: 0,\r\n globalEndIndex: this._textWrapper.length,\r\n relativeEndIndex: this._lines[this._lines.length - 1].text.length,\r\n relativeStartIndex: 0,\r\n currentLineIndex: this._lines.length - 1,\r\n };\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n public override dispose() {\r\n super.dispose();\r\n\r\n this.onLinesReadyObservable.clear();\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.InputTextArea\", InputTextArea);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"line.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/line.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,6CAA+B;AACzD,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,0CAA4B;AACpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAGjD,oCAAoC;AACpC,MAAM,OAAO,IAAK,SAAQ,OAAO;IAc7B,oCAAoC;IAEpC,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAW,IAAI,CAAC,KAAoB;QAChC,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,EAAE;YACtB,OAAO;SACV;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED,2DAA2D;IAC3D,IAAW,gBAAgB;QACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IAED,IAAW,gBAAgB,CAAC,KAAc;QACtC,IAAI,IAAI,CAAC,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ent":["import type { Nullable } from \"core/types\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { Vector3, Matrix } from \"core/Maths/math.vector\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nimport { Control } from \"./control\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport type { Measure } from \"../measure\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\n\r\n/** Class used to render 2D lines */\r\nexport class Line extends Control {\r\n private _lineWidth = 1;\r\n /** @internal */\r\n public _x1 = new ValueAndUnit(0);\r\n /** @internal */\r\n public _y1 = new ValueAndUnit(0);\r\n /** @internal */\r\n public _x2 = new ValueAndUnit(0);\r\n /** @internal */\r\n public _y2 = new ValueAndUnit(0);\r\n private _dash = new Array<number>();\r\n private _connectedControl: Control;\r\n private _connectedControlDirtyObserver: Nullable<Observer<Control>>;\r\n\r\n /** Gets or sets the dash pattern */\r\n @serialize()\r\n public get dash(): Array<number> {\r\n return this._dash;\r\n }\r\n\r\n public set dash(value: Array<number>) {\r\n if (this._dash === value) {\r\n return;\r\n }\r\n\r\n this._dash = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the control connected with the line end */\r\n public get connectedControl(): Control {\r\n return this._connectedControl;\r\n }\r\n\r\n public set connectedControl(value: Control) {\r\n if (this._connectedControl === value) {\r\n return;\r\n }\r\n\r\n if (this._connectedControlDirtyObserver && this._connectedControl) {\r\n this._connectedControl.onDirtyObservable.remove(this._connectedControlDirtyObserver);\r\n this._connectedControlDirtyObserver = null;\r\n }\r\n\r\n if (value) {\r\n this._connectedControlDirtyObserver = value.onDirtyObservable.add(() => this._markAsDirty());\r\n }\r\n\r\n this._connectedControl = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets start coordinates on X axis */\r\n @serialize()\r\n public get x1(): string | number {\r\n return this._x1.toString(this._host);\r\n }\r\n\r\n public set x1(value: string | number) {\r\n if (this._x1.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._x1.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets start coordinates on Y axis */\r\n @serialize()\r\n public get y1(): string | number {\r\n return this._y1.toString(this._host);\r\n }\r\n\r\n public set y1(value: string | number) {\r\n if (this._y1.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._y1.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets end coordinates on X axis */\r\n @serialize()\r\n public get x2(): string | number {\r\n return this._x2.toString(this._host);\r\n }\r\n\r\n public set x2(value: string | number) {\r\n if (this._x2.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._x2.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets end coordinates on Y axis */\r\n @serialize()\r\n public get y2(): string | number {\r\n return this._y2.toString(this._host);\r\n }\r\n\r\n public set y2(value: string | number) {\r\n if (this._y2.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._y2.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets line width */\r\n @serialize()\r\n public get lineWidth(): number {\r\n return this._lineWidth;\r\n }\r\n\r\n public set lineWidth(value: number) {\r\n if (this._lineWidth === value) {\r\n return;\r\n }\r\n\r\n this._lineWidth = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets horizontal alignment */\r\n public override set horizontalAlignment(value: number) {\r\n return;\r\n }\r\n\r\n /** Gets or sets vertical alignment */\r\n public override set verticalAlignment(value: number) {\r\n return;\r\n }\r\n\r\n /** @internal */\r\n public get _effectiveX2(): number {\r\n return (this._connectedControl ? this._connectedControl.centerX : 0) + this._x2.getValue(this._host);\r\n }\r\n\r\n /** @internal */\r\n public get _effectiveY2(): number {\r\n return (this._connectedControl ? this._connectedControl.centerY : 0) + this._y2.getValue(this._host);\r\n }\r\n\r\n /**\r\n * Creates a new Line\r\n * @param name defines the control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n\r\n this._automaticSize = true;\r\n\r\n this.isHitTestVisible = false;\r\n this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n this._verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Line\";\r\n }\r\n\r\n public override _draw(context: ICanvasRenderingContext): void {\r\n context.save();\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n this._applyStates(context);\r\n context.strokeStyle = this._getColor(context);\r\n context.lineWidth = this._lineWidth;\r\n context.setLineDash(this._dash);\r\n\r\n context.beginPath();\r\n context.moveTo(this._cachedParentMeasure.left + this._x1.getValue(this._host), this._cachedParentMeasure.top + this._y1.getValue(this._host));\r\n\r\n context.lineTo(this._cachedParentMeasure.left + this._effectiveX2, this._cachedParentMeasure.top + this._effectiveY2);\r\n context.stroke();\r\n\r\n context.restore();\r\n }\r\n\r\n public override _measure(): void {\r\n // Width / Height\r\n this._currentMeasure.width = Math.abs(this._x1.getValue(this._host) - this._effectiveX2) + this._lineWidth;\r\n this._currentMeasure.height = Math.abs(this._y1.getValue(this._host) - this._effectiveY2) + this._lineWidth;\r\n }\r\n\r\n protected override _computeAlignment(parentMeasure: Measure): void {\r\n this._currentMeasure.left = parentMeasure.left + Math.min(this._x1.getValue(this._host), this._effectiveX2) - this._lineWidth / 2;\r\n this._currentMeasure.top = parentMeasure.top + Math.min(this._y1.getValue(this._host), this._effectiveY2) - this._lineWidth / 2;\r\n }\r\n\r\n /**\r\n * Move one end of the line given 3D cartesian coordinates.\r\n * @param position Targeted world position\r\n * @param scene Scene\r\n * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.\r\n */\r\n public override moveToVector3(position: Vector3, scene: Scene, end: boolean = false): void {\r\n if (!this._host || this.parent !== this._host._rootContainer) {\r\n Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\");\r\n return;\r\n }\r\n\r\n const globalViewport = this._host._getGlobalViewport();\r\n const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);\r\n\r\n this._moveToProjectedPosition(projectedPosition, end);\r\n\r\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\r\n this.notRenderable = true;\r\n return;\r\n }\r\n this.notRenderable = false;\r\n }\r\n\r\n /**\r\n * Move one end of the line to a position in screen absolute space.\r\n * @param projectedPosition Position in screen absolute space (X, Y)\r\n * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.\r\n */\r\n public override _moveToProjectedPosition(projectedPosition: Vector3, end: boolean = false): void {\r\n const x: string = projectedPosition.x + this._linkOffsetX.getValue(this._host) + \"px\";\r\n const y: string = projectedPosition.y + this._linkOffsetY.getValue(this._host) + \"px\";\r\n\r\n if (end) {\r\n this.x2 = x;\r\n this.y2 = y;\r\n this._x2.ignoreAdaptiveScaling = true;\r\n this._y2.ignoreAdaptiveScaling = true;\r\n } else {\r\n this.x1 = x;\r\n this.y1 = y;\r\n this._x1.ignoreAdaptiveScaling = true;\r\n this._y1.ignoreAdaptiveScaling = true;\r\n }\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Line\", Line);\r\n"]}
1
+ {"version":3,"file":"line.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/line.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,6CAA+B;AACzD,OAAO,EAAE,KAAK,EAAE,sCAAwB;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAA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Y,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;QAEtF,IAAI,GAAG,EAAE,CAAC;YACN,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,IAAI,CAAC,GAAG,CAAC,qBAAqB,GAAG,IAAI,CAAC;YACtC,IAAI,CAAC,GAAG,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAC1C,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,IAAI,CAAC,GAAG,CAAC,qBAAqB,GAAG,IAAI,CAAC;YACtC,IAAI,CAAC,GAAG,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAC1C,CAAC;IACL,CAAC;CACJ;AAzOG;IADC,SAAS,EAAE;gCAGX;AAoCD;IADC,SAAS,EAAE;8BAGX;AAcD;IADC,SAAS,EAAE;8BAGX;AAcD;IADC,SAAS,EAAE;8BAGX;AAcD;IADC,SAAS,EAAE;8BAGX;AAcD;IADC,SAAS,EAAE;qCAGX;AAkIL,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport type { Observer } from \"core/Misc/observable\";\r\nimport { Vector3, Matrix } from \"core/Maths/math.vector\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport type { Scene } from \"core/scene\";\r\n\r\nimport { Control } from \"./control\";\r\nimport { ValueAndUnit } from \"../valueAndUnit\";\r\nimport type { Measure } from \"../measure\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\n\r\n/** Class used to render 2D lines */\r\nexport class Line extends Control {\r\n private _lineWidth = 1;\r\n /** @internal */\r\n public _x1 = new ValueAndUnit(0);\r\n /** @internal */\r\n public _y1 = new ValueAndUnit(0);\r\n /** @internal */\r\n public _x2 = new ValueAndUnit(0);\r\n /** @internal */\r\n public _y2 = new ValueAndUnit(0);\r\n private _dash = new Array<number>();\r\n private _connectedControl: Control;\r\n private _connectedControlDirtyObserver: Nullable<Observer<Control>>;\r\n\r\n /** Gets or sets the dash pattern */\r\n @serialize()\r\n public get dash(): Array<number> {\r\n return this._dash;\r\n }\r\n\r\n public set dash(value: Array<number>) {\r\n if (this._dash === value) {\r\n return;\r\n }\r\n\r\n this._dash = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets the control connected with the line end */\r\n public get connectedControl(): Control {\r\n return this._connectedControl;\r\n }\r\n\r\n public set connectedControl(value: Control) {\r\n if (this._connectedControl === value) {\r\n return;\r\n }\r\n\r\n if (this._connectedControlDirtyObserver && this._connectedControl) {\r\n this._connectedControl.onDirtyObservable.remove(this._connectedControlDirtyObserver);\r\n this._connectedControlDirtyObserver = null;\r\n }\r\n\r\n if (value) {\r\n this._connectedControlDirtyObserver = value.onDirtyObservable.add(() => this._markAsDirty());\r\n }\r\n\r\n this._connectedControl = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets start coordinates on X axis */\r\n @serialize()\r\n public get x1(): string | number {\r\n return this._x1.toString(this._host);\r\n }\r\n\r\n public set x1(value: string | number) {\r\n if (this._x1.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._x1.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets start coordinates on Y axis */\r\n @serialize()\r\n public get y1(): string | number {\r\n return this._y1.toString(this._host);\r\n }\r\n\r\n public set y1(value: string | number) {\r\n if (this._y1.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._y1.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets end coordinates on X axis */\r\n @serialize()\r\n public get x2(): string | number {\r\n return this._x2.toString(this._host);\r\n }\r\n\r\n public set x2(value: string | number) {\r\n if (this._x2.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._x2.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets end coordinates on Y axis */\r\n @serialize()\r\n public get y2(): string | number {\r\n return this._y2.toString(this._host);\r\n }\r\n\r\n public set y2(value: string | number) {\r\n if (this._y2.toString(this._host) === value) {\r\n return;\r\n }\r\n\r\n if (this._y2.fromString(value)) {\r\n this._markAsDirty();\r\n }\r\n }\r\n\r\n /** Gets or sets line width */\r\n @serialize()\r\n public get lineWidth(): number {\r\n return this._lineWidth;\r\n }\r\n\r\n public set lineWidth(value: number) {\r\n if (this._lineWidth === value) {\r\n return;\r\n }\r\n\r\n this._lineWidth = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets horizontal alignment */\r\n public override set horizontalAlignment(value: number) {\r\n return;\r\n }\r\n\r\n /** Gets or sets vertical alignment */\r\n public override set verticalAlignment(value: number) {\r\n return;\r\n }\r\n\r\n /** @internal */\r\n public get _effectiveX2(): number {\r\n return (this._connectedControl ? this._connectedControl.centerX : 0) + this._x2.getValue(this._host);\r\n }\r\n\r\n /** @internal */\r\n public get _effectiveY2(): number {\r\n return (this._connectedControl ? this._connectedControl.centerY : 0) + this._y2.getValue(this._host);\r\n }\r\n\r\n /**\r\n * Creates a new Line\r\n * @param name defines the control name\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n\r\n this._automaticSize = true;\r\n\r\n this.isHitTestVisible = false;\r\n this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;\r\n this._verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Line\";\r\n }\r\n\r\n public override _draw(context: ICanvasRenderingContext): void {\r\n context.save();\r\n\r\n if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n }\r\n\r\n this._applyStates(context);\r\n context.strokeStyle = this._getColor(context);\r\n context.lineWidth = this._lineWidth;\r\n context.setLineDash(this._dash);\r\n\r\n context.beginPath();\r\n context.moveTo(this._cachedParentMeasure.left + this._x1.getValue(this._host), this._cachedParentMeasure.top + this._y1.getValue(this._host));\r\n\r\n context.lineTo(this._cachedParentMeasure.left + this._effectiveX2, this._cachedParentMeasure.top + this._effectiveY2);\r\n context.stroke();\r\n\r\n context.restore();\r\n }\r\n\r\n public override _measure(): void {\r\n // Width / Height\r\n this._currentMeasure.width = Math.abs(this._x1.getValue(this._host) - this._effectiveX2) + this._lineWidth;\r\n this._currentMeasure.height = Math.abs(this._y1.getValue(this._host) - this._effectiveY2) + this._lineWidth;\r\n }\r\n\r\n protected override _computeAlignment(parentMeasure: Measure): void {\r\n this._currentMeasure.left = parentMeasure.left + Math.min(this._x1.getValue(this._host), this._effectiveX2) - this._lineWidth / 2;\r\n this._currentMeasure.top = parentMeasure.top + Math.min(this._y1.getValue(this._host), this._effectiveY2) - this._lineWidth / 2;\r\n }\r\n\r\n /**\r\n * Move one end of the line given 3D cartesian coordinates.\r\n * @param position Targeted world position\r\n * @param scene Scene\r\n * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.\r\n */\r\n public override moveToVector3(position: Vector3, scene: Scene, end: boolean = false): void {\r\n if (!this._host || this.parent !== this._host._rootContainer) {\r\n Tools.Error(\"Cannot move a control to a vector3 if the control is not at root level\");\r\n return;\r\n }\r\n\r\n const globalViewport = this._host._getGlobalViewport();\r\n const projectedPosition = Vector3.Project(position, Matrix.IdentityReadOnly, scene.getTransformMatrix(), globalViewport);\r\n\r\n this._moveToProjectedPosition(projectedPosition, end);\r\n\r\n if (projectedPosition.z < 0 || projectedPosition.z > 1) {\r\n this.notRenderable = true;\r\n return;\r\n }\r\n this.notRenderable = false;\r\n }\r\n\r\n /**\r\n * Move one end of the line to a position in screen absolute space.\r\n * @param projectedPosition Position in screen absolute space (X, Y)\r\n * @param end (opt) Set to true to assign x2 and y2 coordinates of the line. Default assign to x1 and y1.\r\n */\r\n public override _moveToProjectedPosition(projectedPosition: Vector3, end: boolean = false): void {\r\n const x: string = projectedPosition.x + this._linkOffsetX.getValue(this._host) + \"px\";\r\n const y: string = projectedPosition.y + this._linkOffsetY.getValue(this._host) + \"px\";\r\n\r\n if (end) {\r\n this.x2 = x;\r\n this.y2 = y;\r\n this._x2.ignoreAdaptiveScaling = true;\r\n this._y2.ignoreAdaptiveScaling = true;\r\n } else {\r\n this.x1 = x;\r\n this.y1 = y;\r\n this._x1.ignoreAdaptiveScaling = true;\r\n this._y1.ignoreAdaptiveScaling = true;\r\n }\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Line\", Line);\r\n"]}