@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":"container.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/container.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAEjD,OAAO,EAAE,cAAc,EAAE,6DAA+C;AACxE,OAAO,EAAE,OAAO,EAAE,sDAAwC;AAC1D,OAAO,EAAE,SAAS,EAAE,6CAA+B;AACnD,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAElD,OAAO,EAAE,KAAK,EAAE,sCAAwB;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,OAAO;IAwBlC,wJAAwJ;IAExJ,IAAW,2BAA2B;QAClC,OAAO,IAAI,CAAC,4BAA4B,CAAC;IAC7C,CAAC;IACD,IAAW,2BAA2B,CAAC,KAAc;QACjD,IAAI,IAAI,CAAC,4BAA4B,KAAK,KAAK,EAAE;YAC7C,OAAO;SACV;QACD,IAAI,CAAC,4BAA4B,GAAG,KAAK,CAAC;QAC1C,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAaD,oGAAoG;IAEpG,IAAW,qBAAqB;QAC5B,OAAO,IAAI,CAAC,sBAA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{ Nullable } from \"core/types\";\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\nimport { Control } from \"./control\";\r\nimport { Measure } from \"../measure\";\r\nimport type { AdvancedDynamicTexture } from \"../advancedDynamicTexture\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport { DynamicTexture } from \"core/Materials/Textures/dynamicTexture\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport type { BaseGradient } from \"./gradient/BaseGradient\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { Matrix2D } from \"../math2D\";\r\n\r\n/**\r\n * Root class for 2D containers\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#containers\r\n */\r\nexport class Container extends Control {\r\n /** @internal */\r\n public _children = new Array<Control>();\r\n /** @internal */\r\n protected _measureForChildren = Measure.Empty();\r\n /** @internal */\r\n protected _background = \"\";\r\n /** @internal */\r\n protected _backgroundGradient: Nullable<BaseGradient> = null;\r\n /** @internal */\r\n protected _adaptWidthToChildren = false;\r\n /** @internal */\r\n protected _adaptHeightToChildren = false;\r\n /** @internal */\r\n protected _renderToIntermediateTexture: boolean = false;\r\n /** @internal */\r\n protected _intermediateTexture: Nullable<DynamicTexture> = null;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that the container will let internal controls handle picking instead of doing it directly using its bounding info\r\n */\r\n @serialize()\r\n public delegatePickingToChildren = false;\r\n\r\n /** Gets or sets boolean indicating if children should be rendered to an intermediate texture rather than directly to host, useful for alpha blending */\r\n @serialize()\r\n public get renderToIntermediateTexture(): boolean {\r\n return this._renderToIntermediateTexture;\r\n }\r\n public set renderToIntermediateTexture(value: boolean) {\r\n if (this._renderToIntermediateTexture === value) {\r\n return;\r\n }\r\n this._renderToIntermediateTexture = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that layout cycle errors should be displayed on the console\r\n */\r\n public logLayoutCycleErrors = false;\r\n\r\n /**\r\n * Gets or sets the number of layout cycles (a change involved by a control while evaluating the layout) allowed\r\n */\r\n @serialize()\r\n public maxLayoutCycle = 3;\r\n\r\n /** Gets or sets a boolean indicating if the container should try to adapt to its children height */\r\n @serialize()\r\n public get adaptHeightToChildren(): boolean {\r\n return this._adaptHeightToChildren;\r\n }\r\n\r\n public set adaptHeightToChildren(value: boolean) {\r\n if (this._adaptHeightToChildren === value) {\r\n return;\r\n }\r\n\r\n this._adaptHeightToChildren = value;\r\n\r\n if (value) {\r\n this.height = \"100%\";\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the container should try to adapt to its children width */\r\n @serialize()\r\n public get adaptWidthToChildren(): boolean {\r\n return this._adaptWidthToChildren;\r\n }\r\n\r\n public set adaptWidthToChildren(value: boolean) {\r\n if (this._adaptWidthToChildren === value) {\r\n return;\r\n }\r\n\r\n this._adaptWidthToChildren = value;\r\n\r\n if (value) {\r\n this.width = \"100%\";\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets background color */\r\n @serialize()\r\n public get background(): string {\r\n return this._background;\r\n }\r\n\r\n public set background(value: string) {\r\n if (this._background === value) {\r\n return;\r\n }\r\n\r\n this._background = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets background gradient color. Takes precedence over background */\r\n @serialize()\r\n public get backgroundGradient() {\r\n return this._backgroundGradient;\r\n }\r\n\r\n public set backgroundGradient(value: Nullable<BaseGradient>) {\r\n if (this._backgroundGradient === value) {\r\n return;\r\n }\r\n this._backgroundGradient = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets the list of children */\r\n public get children(): Control[] {\r\n return this._children;\r\n }\r\n\r\n public override get isReadOnly() {\r\n return this._isReadOnly;\r\n }\r\n\r\n public override set isReadOnly(value: boolean) {\r\n this._isReadOnly = value;\r\n\r\n for (const child of this._children) {\r\n child.isReadOnly = value;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new Container\r\n * @param name defines the name of the container\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Container\";\r\n }\r\n\r\n public override _flagDescendantsAsMatrixDirty(): void {\r\n for (const child of this.children) {\r\n child._isClipped = false;\r\n child._markMatrixAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets a child using its name\r\n * @param name defines the child name to look for\r\n * @returns the child control if found\r\n */\r\n public getChildByName(name: string): Nullable<Control> {\r\n for (const child of this.children) {\r\n if (child.name === name) {\r\n return child;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets a child using its type and its name\r\n * @param name defines the child name to look for\r\n * @param type defines the child type to look for\r\n * @returns the child control if found\r\n */\r\n public getChildByType(name: string, type: string): Nullable<Control> {\r\n for (const child of this.children) {\r\n if (child.typeName === type) {\r\n return child;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Search for a specific control in children\r\n * @param control defines the control to look for\r\n * @returns true if the control is in child list\r\n */\r\n public containsControl(control: Control): boolean {\r\n return this.children.indexOf(control) !== -1;\r\n }\r\n\r\n /**\r\n * Adds a new control to the current container\r\n * @param control defines the control to add\r\n * @returns the current container\r\n */\r\n public addControl(control: Nullable<Control>): Container {\r\n if (!control) {\r\n return this;\r\n }\r\n\r\n const index = this._children.indexOf(control);\r\n\r\n if (index !== -1) {\r\n return this;\r\n }\r\n control._link(this._host);\r\n\r\n control._markAllAsDirty();\r\n\r\n this._reOrderControl(control);\r\n\r\n this._markAsDirty();\r\n\r\n this.onControlAddedObservable.notifyObservers(control);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes all controls from the current container\r\n * @returns the current container\r\n */\r\n public clearControls(): Container {\r\n const children = this.children.slice();\r\n\r\n for (const child of children) {\r\n this.removeControl(child);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes a control from the current container\r\n * @param control defines the control to remove\r\n * @returns the current container\r\n */\r\n public removeControl(control: Control): Container {\r\n const index = this._children.indexOf(control);\r\n\r\n if (index !== -1) {\r\n this._children.splice(index, 1);\r\n\r\n control.parent = null;\r\n }\r\n\r\n control.linkWithMesh(null);\r\n\r\n if (this._host) {\r\n this._host._cleanControlAfterRemoval(control);\r\n }\r\n\r\n this._markAsDirty();\r\n\r\n this.onControlRemovedObservable.notifyObservers(control);\r\n return this;\r\n }\r\n\r\n /**\r\n * An event triggered when any control is added to this container.\r\n */\r\n public onControlAddedObservable = new Observable<Nullable<Control>>();\r\n\r\n /**\r\n * An event triggered when any control is removed from this container.\r\n */\r\n public onControlRemovedObservable = new Observable<Nullable<Control>>();\r\n\r\n /**\r\n * @internal\r\n */\r\n public _reOrderControl(control: Control): void {\r\n const linkedMesh = control.linkedMesh;\r\n\r\n this.removeControl(control);\r\n\r\n let wasAdded = false;\r\n for (let index = 0; index < this._children.length; index++) {\r\n if (this._children[index].zIndex > control.zIndex) {\r\n this._children.splice(index, 0, control);\r\n wasAdded = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!wasAdded) {\r\n this._children.push(control);\r\n }\r\n\r\n control.parent = this;\r\n\r\n if (linkedMesh) {\r\n control.linkWithMesh(linkedMesh);\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _offsetLeft(offset: number) {\r\n super._offsetLeft(offset);\r\n\r\n for (const child of this._children) {\r\n child._offsetLeft(offset);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _offsetTop(offset: number) {\r\n super._offsetTop(offset);\r\n\r\n for (const child of this._children) {\r\n child._offsetTop(offset);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override _markAllAsDirty(): void {\r\n super._markAllAsDirty();\r\n\r\n for (let index = 0; index < this._children.length; index++) {\r\n this._children[index]._markAllAsDirty();\r\n }\r\n }\r\n\r\n protected _getBackgroundColor(context: ICanvasRenderingContext) {\r\n return this._backgroundGradient ? this._backgroundGradient.getCanvasGradient(context) : this._background;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _localDraw(context: ICanvasRenderingContext): void {\r\n if (this._background || this._backgroundGradient) {\r\n context.save();\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 context.fillStyle = this._getBackgroundColor(context);\r\n\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n context.restore();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _link(host: AdvancedDynamicTexture): void {\r\n super._link(host);\r\n\r\n for (const child of this._children) {\r\n child._link(host);\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected _beforeLayout() {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected override _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {\r\n super._processMeasures(parentMeasure, context);\r\n this._evaluateClippingState(parentMeasure);\r\n if (this._renderToIntermediateTexture) {\r\n if (this._intermediateTexture && this._host.getScene() != this._intermediateTexture.getScene()) {\r\n this._intermediateTexture.dispose();\r\n this._intermediateTexture = null;\r\n }\r\n if (!this._intermediateTexture) {\r\n this._intermediateTexture = new DynamicTexture(\r\n \"\",\r\n { width: this._currentMeasure.width, height: this._currentMeasure.height },\r\n this._host.getScene(),\r\n false,\r\n Texture.NEAREST_SAMPLINGMODE,\r\n Constants.TEXTUREFORMAT_RGBA,\r\n false\r\n );\r\n this._intermediateTexture.hasAlpha = true;\r\n } else {\r\n this._intermediateTexture.scaleTo(this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean {\r\n if (!this.isDirty && (!this.isVisible || this.notRenderable)) {\r\n return false;\r\n }\r\n\r\n this.host._numLayoutCalls++;\r\n\r\n if (this._isDirty) {\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._prevCurrentMeasureTransformedIntoGlobalSpace);\r\n }\r\n\r\n let rebuildCount = 0;\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n this._beforeLayout();\r\n\r\n do {\r\n let computedWidth = -1;\r\n let computedHeight = -1;\r\n this._rebuildLayout = false;\r\n this._processMeasures(parentMeasure, context);\r\n\r\n if (!this._isClipped) {\r\n for (const child of this._children) {\r\n child._tempParentMeasure.copyFrom(this._measureForChildren);\r\n\r\n if (child._layout(this._measureForChildren, context)) {\r\n if (child.isVisible && !child.notRenderable) {\r\n if (this.adaptWidthToChildren && child._width.isPixel) {\r\n computedWidth = Math.max(computedWidth, child._currentMeasure.width + child._paddingLeftInPixels + child._paddingRightInPixels);\r\n }\r\n if (this.adaptHeightToChildren && child._height.isPixel) {\r\n computedHeight = Math.max(computedHeight, child._currentMeasure.height + child._paddingTopInPixels + child._paddingBottomInPixels);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (this.adaptWidthToChildren && computedWidth >= 0) {\r\n computedWidth += this.paddingLeftInPixels + this.paddingRightInPixels;\r\n if (this.width !== computedWidth + \"px\") {\r\n this.parent?._markAsDirty();\r\n this.width = computedWidth + \"px\";\r\n this._width.ignoreAdaptiveScaling = true;\r\n this._rebuildLayout = true;\r\n }\r\n }\r\n if (this.adaptHeightToChildren && computedHeight >= 0) {\r\n computedHeight += this.paddingTopInPixels + this.paddingBottomInPixels;\r\n if (this.height !== computedHeight + \"px\") {\r\n this.parent?._markAsDirty();\r\n this.height = computedHeight + \"px\";\r\n this._height.ignoreAdaptiveScaling = true;\r\n this._rebuildLayout = true;\r\n }\r\n }\r\n\r\n this._postMeasure();\r\n }\r\n rebuildCount++;\r\n } while (this._rebuildLayout && rebuildCount < this.maxLayoutCycle);\r\n\r\n if (rebuildCount >= 3 && this.logLayoutCycleErrors) {\r\n Logger.Error(`Layout cycle detected in GUI (Container name=${this.name}, uniqueId=${this.uniqueId})`);\r\n }\r\n\r\n context.restore();\r\n\r\n if (this._isDirty) {\r\n this.invalidateRect();\r\n\r\n this._isDirty = false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n protected override _postMeasure() {\r\n // Do nothing by default\r\n }\r\n\r\n private _inverseTransformMatrix = Matrix2D.Identity();\r\n private _inverseMeasure = new Measure(0, 0, 0, 0);\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Measure): void {\r\n const renderToIntermediateTextureThisDraw = this._renderToIntermediateTexture && this._intermediateTexture;\r\n const contextToDrawTo = renderToIntermediateTextureThisDraw ? (<DynamicTexture>this._intermediateTexture).getContext() : context;\r\n\r\n if (renderToIntermediateTextureThisDraw) {\r\n contextToDrawTo.save();\r\n contextToDrawTo.translate(-this._currentMeasure.left, -this._currentMeasure.top);\r\n if (invalidatedRectangle) {\r\n this._transformMatrix.invertToRef(this._inverseTransformMatrix);\r\n invalidatedRectangle.transformToRef(this._inverseTransformMatrix, this._inverseMeasure);\r\n contextToDrawTo.clearRect(this._inverseMeasure.left, this._inverseMeasure.top, this._inverseMeasure.width, this._inverseMeasure.height);\r\n } else {\r\n contextToDrawTo.clearRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n }\r\n\r\n this._localDraw(contextToDrawTo);\r\n\r\n context.save();\r\n\r\n if (this.clipChildren) {\r\n this._clipForChildren(contextToDrawTo);\r\n }\r\n\r\n for (const child of this._children) {\r\n // Only redraw parts of the screen that are invalidated\r\n if (invalidatedRectangle) {\r\n if (!child._intersectsRect(invalidatedRectangle)) {\r\n continue;\r\n }\r\n }\r\n child._render(contextToDrawTo, invalidatedRectangle);\r\n }\r\n\r\n if (renderToIntermediateTextureThisDraw) {\r\n contextToDrawTo.restore();\r\n context.save();\r\n context.globalAlpha = this.alpha;\r\n context.drawImage(contextToDrawTo.canvas, this._currentMeasure.left, this._currentMeasure.top);\r\n context.restore();\r\n }\r\n\r\n context.restore();\r\n }\r\n\r\n public override getDescendantsToRef(results: Control[], directDescendantsOnly: boolean = false, predicate?: (control: Control) => boolean): void {\r\n if (!this.children) {\r\n return;\r\n }\r\n\r\n for (let index = 0; index < this.children.length; index++) {\r\n const item = this.children[index];\r\n\r\n if (!predicate || predicate(item)) {\r\n results.push(item);\r\n }\r\n\r\n if (!directDescendantsOnly) {\r\n item.getDescendantsToRef(results, false, predicate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _processPicking(\r\n x: number,\r\n y: number,\r\n pi: Nullable<PointerInfoBase>,\r\n type: number,\r\n pointerId: number,\r\n buttonIndex: number,\r\n deltaX?: number,\r\n deltaY?: number\r\n ): boolean {\r\n if (!this._isEnabled || !this.isVisible || this.notRenderable) {\r\n return false;\r\n }\r\n\r\n // checks if the picking position is within the container\r\n const contains = super.contains(x, y);\r\n\r\n // if clipChildren is off, we should still pass picking events to children even if we don't contain the pointer\r\n if (!contains && this.clipChildren) {\r\n return false;\r\n }\r\n\r\n if (this.delegatePickingToChildren) {\r\n let contains = false;\r\n for (let index = this._children.length - 1; index >= 0; index--) {\r\n const child = this._children[index];\r\n if (child.isEnabled && child.isHitTestVisible && child.isVisible && !child.notRenderable && child.contains(x, y)) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n return false;\r\n }\r\n }\r\n\r\n // Checking backwards to pick closest first\r\n for (let index = this._children.length - 1; index >= 0; index--) {\r\n const child = this._children[index];\r\n if (child._processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY)) {\r\n if (child.hoverCursor) {\r\n this._host._changeCursor(child.hoverCursor);\r\n }\r\n return true;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n return false;\r\n }\r\n\r\n if (!this.isHitTestVisible) {\r\n return false;\r\n }\r\n\r\n return this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected override _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n super._additionalProcessing(parentMeasure, context);\r\n\r\n this._measureForChildren.copyFrom(this._currentMeasure);\r\n }\r\n\r\n protected _getAdaptDimTo(dim: \"width\" | \"height\"): boolean {\r\n if (dim === \"width\") {\r\n return this.adaptWidthToChildren;\r\n } else {\r\n return this.adaptHeightToChildren;\r\n }\r\n }\r\n\r\n public override isDimensionFullyDefined(dim: \"width\" | \"height\"): boolean {\r\n if (this._getAdaptDimTo(dim)) {\r\n for (const child of this.children) {\r\n if (!child.isDimensionFullyDefined(dim)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return super.isDimensionFullyDefined(dim);\r\n }\r\n\r\n /**\r\n * Serializes the current control\r\n * @param serializationObject defined the JSON serialized object\r\n * @param force force serialization even if isSerializable === false\r\n * @param allowCanvas defines if the control is allowed to use a Canvas2D object to serialize (true by default)\r\n */\r\n public override serialize(serializationObject: any, force: boolean = false, allowCanvas: boolean = true) {\r\n super.serialize(serializationObject, force, allowCanvas);\r\n if (!this.isSerializable && !force) {\r\n return;\r\n }\r\n\r\n if (this.backgroundGradient) {\r\n serializationObject.backgroundGradient = {};\r\n this.backgroundGradient.serialize(serializationObject.backgroundGradient);\r\n }\r\n\r\n if (!this.children.length) {\r\n return;\r\n }\r\n\r\n serializationObject.children = [];\r\n\r\n for (const child of this.children) {\r\n if (child.isSerializable || force) {\r\n const childSerializationObject = {};\r\n child.serialize(childSerializationObject, force, allowCanvas);\r\n serializationObject.children.push(childSerializationObject);\r\n }\r\n }\r\n }\r\n\r\n /** Releases associated resources */\r\n public override dispose() {\r\n super.dispose();\r\n\r\n for (let index = this.children.length - 1; index >= 0; index--) {\r\n this.children[index].dispose();\r\n }\r\n this._intermediateTexture?.dispose();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture, urlRewriter?: (url: string) => string) {\r\n super._parseFromContent(serializedObject, host, urlRewriter);\r\n this._link(host);\r\n\r\n // Gradient\r\n if (serializedObject.backgroundGradient) {\r\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.backgroundGradient.className);\r\n this._backgroundGradient = new className();\r\n this._backgroundGradient?.parse(serializedObject.backgroundGradient);\r\n }\r\n\r\n if (!serializedObject.children) {\r\n return;\r\n }\r\n\r\n for (const childData of serializedObject.children) {\r\n this.addControl(Control.Parse(childData, host, urlRewriter));\r\n }\r\n }\r\n\r\n public override isReady(): boolean {\r\n for (const child of this.children) {\r\n if (!child.isReady()) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Container\", Container);\r\n"]}
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../../dev/gui/src/2D/controls/container.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,uCAAyB;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,0CAA4B;AAEpD,OAAO,EAAE,SAAS,EAAE,2CAA6B;AAEjD,OAAO,EAAE,cAAc,EAAE,6DAA+C;AACxE,OAAO,EAAE,OAAO,EAAE,sDAAwC;AAC1D,OAAO,EAAE,SAAS,EAAE,6CAA+B;AACnD,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAElD,OAAO,EAAE,KAAK,EAAE,sCAAwB;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;A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iDACc;AAI1B;IADC,SAAS,EAAE;sDAGX;AAkBD;IADC,SAAS,EAAE;qDAGX;AAkBD;IADC,SAAS,EAAE;2CAGX;AAaD;IADC,SAAS,EAAE;mDAGX;AAymBL,aAAa,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAC","sourcesContent":["import type { Nullable } from \"core/types\";\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\nimport { Control } from \"./control\";\r\nimport { Measure } from \"../measure\";\r\nimport type { AdvancedDynamicTexture } from \"../advancedDynamicTexture\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { PointerInfoBase } from \"core/Events/pointerEvents\";\r\nimport { serialize } from \"core/Misc/decorators\";\r\nimport type { ICanvasRenderingContext } from \"core/Engines/ICanvas\";\r\nimport { DynamicTexture } from \"core/Materials/Textures/dynamicTexture\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { Constants } from \"core/Engines/constants\";\r\nimport { Observable } from \"core/Misc/observable\";\r\nimport type { BaseGradient } from \"./gradient/BaseGradient\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { Matrix2D } from \"../math2D\";\r\n\r\n/**\r\n * Root class for 2D containers\r\n * @see https://doc.babylonjs.com/features/featuresDeepDive/gui/gui#containers\r\n */\r\nexport class Container extends Control {\r\n /** @internal */\r\n public _children = new Array<Control>();\r\n /** @internal */\r\n protected _measureForChildren = Measure.Empty();\r\n /** @internal */\r\n protected _background = \"\";\r\n /** @internal */\r\n protected _backgroundGradient: Nullable<BaseGradient> = null;\r\n /** @internal */\r\n protected _adaptWidthToChildren = false;\r\n /** @internal */\r\n protected _adaptHeightToChildren = false;\r\n /** @internal */\r\n protected _renderToIntermediateTexture: boolean = false;\r\n /** @internal */\r\n protected _intermediateTexture: Nullable<DynamicTexture> = null;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that the container will let internal controls handle picking instead of doing it directly using its bounding info\r\n */\r\n @serialize()\r\n public delegatePickingToChildren = false;\r\n\r\n /** Gets or sets boolean indicating if children should be rendered to an intermediate texture rather than directly to host, useful for alpha blending */\r\n @serialize()\r\n public get renderToIntermediateTexture(): boolean {\r\n return this._renderToIntermediateTexture;\r\n }\r\n public set renderToIntermediateTexture(value: boolean) {\r\n if (this._renderToIntermediateTexture === value) {\r\n return;\r\n }\r\n this._renderToIntermediateTexture = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that layout cycle errors should be displayed on the console\r\n */\r\n public logLayoutCycleErrors = false;\r\n\r\n /**\r\n * Gets or sets the number of layout cycles (a change involved by a control while evaluating the layout) allowed\r\n */\r\n @serialize()\r\n public maxLayoutCycle = 3;\r\n\r\n /** Gets or sets a boolean indicating if the container should try to adapt to its children height */\r\n @serialize()\r\n public get adaptHeightToChildren(): boolean {\r\n return this._adaptHeightToChildren;\r\n }\r\n\r\n public set adaptHeightToChildren(value: boolean) {\r\n if (this._adaptHeightToChildren === value) {\r\n return;\r\n }\r\n\r\n this._adaptHeightToChildren = value;\r\n\r\n if (value) {\r\n this.height = \"100%\";\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the container should try to adapt to its children width */\r\n @serialize()\r\n public get adaptWidthToChildren(): boolean {\r\n return this._adaptWidthToChildren;\r\n }\r\n\r\n public set adaptWidthToChildren(value: boolean) {\r\n if (this._adaptWidthToChildren === value) {\r\n return;\r\n }\r\n\r\n this._adaptWidthToChildren = value;\r\n\r\n if (value) {\r\n this.width = \"100%\";\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets background color */\r\n @serialize()\r\n public get background(): string {\r\n return this._background;\r\n }\r\n\r\n public set background(value: string) {\r\n if (this._background === value) {\r\n return;\r\n }\r\n\r\n this._background = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets or sets background gradient color. Takes precedence over background */\r\n @serialize()\r\n public get backgroundGradient() {\r\n return this._backgroundGradient;\r\n }\r\n\r\n public set backgroundGradient(value: Nullable<BaseGradient>) {\r\n if (this._backgroundGradient === value) {\r\n return;\r\n }\r\n this._backgroundGradient = value;\r\n this._markAsDirty();\r\n }\r\n\r\n /** Gets the list of children */\r\n public get children(): Control[] {\r\n return this._children;\r\n }\r\n\r\n public override get isReadOnly() {\r\n return this._isReadOnly;\r\n }\r\n\r\n public override set isReadOnly(value: boolean) {\r\n this._isReadOnly = value;\r\n\r\n for (const child of this._children) {\r\n child.isReadOnly = value;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new Container\r\n * @param name defines the name of the container\r\n */\r\n constructor(public override name?: string) {\r\n super(name);\r\n }\r\n\r\n protected override _getTypeName(): string {\r\n return \"Container\";\r\n }\r\n\r\n public override _flagDescendantsAsMatrixDirty(): void {\r\n for (const child of this.children) {\r\n child._isClipped = false;\r\n child._markMatrixAsDirty();\r\n }\r\n }\r\n\r\n /**\r\n * Gets a child using its name\r\n * @param name defines the child name to look for\r\n * @returns the child control if found\r\n */\r\n public getChildByName(name: string): Nullable<Control> {\r\n for (const child of this.children) {\r\n if (child.name === name) {\r\n return child;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets a child using its type and its name\r\n * @param name defines the child name to look for\r\n * @param type defines the child type to look for\r\n * @returns the child control if found\r\n */\r\n public getChildByType(name: string, type: string): Nullable<Control> {\r\n for (const child of this.children) {\r\n if (child.typeName === type) {\r\n return child;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Search for a specific control in children\r\n * @param control defines the control to look for\r\n * @returns true if the control is in child list\r\n */\r\n public containsControl(control: Control): boolean {\r\n return this.children.indexOf(control) !== -1;\r\n }\r\n\r\n /**\r\n * Adds a new control to the current container\r\n * @param control defines the control to add\r\n * @returns the current container\r\n */\r\n public addControl(control: Nullable<Control>): Container {\r\n if (!control) {\r\n return this;\r\n }\r\n\r\n const index = this._children.indexOf(control);\r\n\r\n if (index !== -1) {\r\n return this;\r\n }\r\n control._link(this._host);\r\n\r\n control._markAllAsDirty();\r\n\r\n this._reOrderControl(control);\r\n\r\n this._markAsDirty();\r\n\r\n this.onControlAddedObservable.notifyObservers(control);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes all controls from the current container\r\n * @returns the current container\r\n */\r\n public clearControls(): Container {\r\n const children = this.children.slice();\r\n\r\n for (const child of children) {\r\n this.removeControl(child);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Removes a control from the current container\r\n * @param control defines the control to remove\r\n * @returns the current container\r\n */\r\n public removeControl(control: Control): Container {\r\n const index = this._children.indexOf(control);\r\n\r\n if (index !== -1) {\r\n this._children.splice(index, 1);\r\n\r\n control.parent = null;\r\n }\r\n\r\n control.linkWithMesh(null);\r\n\r\n if (this._host) {\r\n this._host._cleanControlAfterRemoval(control);\r\n }\r\n\r\n this._markAsDirty();\r\n\r\n this.onControlRemovedObservable.notifyObservers(control);\r\n return this;\r\n }\r\n\r\n /**\r\n * An event triggered when any control is added to this container.\r\n */\r\n public onControlAddedObservable = new Observable<Nullable<Control>>();\r\n\r\n /**\r\n * An event triggered when any control is removed from this container.\r\n */\r\n public onControlRemovedObservable = new Observable<Nullable<Control>>();\r\n\r\n /**\r\n * @internal\r\n */\r\n public _reOrderControl(control: Control): void {\r\n const linkedMesh = control.linkedMesh;\r\n\r\n this.removeControl(control);\r\n\r\n let wasAdded = false;\r\n for (let index = 0; index < this._children.length; index++) {\r\n if (this._children[index].zIndex > control.zIndex) {\r\n this._children.splice(index, 0, control);\r\n wasAdded = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!wasAdded) {\r\n this._children.push(control);\r\n }\r\n\r\n control.parent = this;\r\n\r\n if (linkedMesh) {\r\n control.linkWithMesh(linkedMesh);\r\n }\r\n\r\n this._markAsDirty();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _offsetLeft(offset: number) {\r\n super._offsetLeft(offset);\r\n\r\n for (const child of this._children) {\r\n child._offsetLeft(offset);\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _offsetTop(offset: number) {\r\n super._offsetTop(offset);\r\n\r\n for (const child of this._children) {\r\n child._offsetTop(offset);\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override _markAllAsDirty(): void {\r\n super._markAllAsDirty();\r\n\r\n for (let index = 0; index < this._children.length; index++) {\r\n this._children[index]._markAllAsDirty();\r\n }\r\n }\r\n\r\n protected _getBackgroundColor(context: ICanvasRenderingContext) {\r\n return this._backgroundGradient ? this._backgroundGradient.getCanvasGradient(context) : this._background;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected _localDraw(context: ICanvasRenderingContext): void {\r\n if (this._background || this._backgroundGradient) {\r\n context.save();\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 context.fillStyle = this._getBackgroundColor(context);\r\n\r\n context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n context.restore();\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _link(host: AdvancedDynamicTexture): void {\r\n super._link(host);\r\n\r\n for (const child of this._children) {\r\n child._link(host);\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected _beforeLayout() {\r\n // Do nothing\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected override _processMeasures(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n if (this._isDirty || !this._cachedParentMeasure.isEqualsTo(parentMeasure)) {\r\n super._processMeasures(parentMeasure, context);\r\n this._evaluateClippingState(parentMeasure);\r\n if (this._renderToIntermediateTexture) {\r\n if (this._intermediateTexture && this._host.getScene() != this._intermediateTexture.getScene()) {\r\n this._intermediateTexture.dispose();\r\n this._intermediateTexture = null;\r\n }\r\n if (!this._intermediateTexture) {\r\n this._intermediateTexture = new DynamicTexture(\r\n \"\",\r\n { width: this._currentMeasure.width, height: this._currentMeasure.height },\r\n this._host.getScene(),\r\n false,\r\n Texture.NEAREST_SAMPLINGMODE,\r\n Constants.TEXTUREFORMAT_RGBA,\r\n false\r\n );\r\n this._intermediateTexture.hasAlpha = true;\r\n } else {\r\n this._intermediateTexture.scaleTo(this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _layout(parentMeasure: Measure, context: ICanvasRenderingContext): boolean {\r\n if (!this.isDirty && (!this.isVisible || this.notRenderable)) {\r\n return false;\r\n }\r\n\r\n this.host._numLayoutCalls++;\r\n\r\n if (this._isDirty) {\r\n this._currentMeasure.transformToRef(this._transformMatrix, this._prevCurrentMeasureTransformedIntoGlobalSpace);\r\n }\r\n\r\n let rebuildCount = 0;\r\n\r\n context.save();\r\n\r\n this._applyStates(context);\r\n\r\n this._beforeLayout();\r\n\r\n do {\r\n let computedWidth = -1;\r\n let computedHeight = -1;\r\n this._rebuildLayout = false;\r\n this._processMeasures(parentMeasure, context);\r\n\r\n if (!this._isClipped) {\r\n for (const child of this._children) {\r\n child._tempParentMeasure.copyFrom(this._measureForChildren);\r\n\r\n if (child._layout(this._measureForChildren, context)) {\r\n if (child.isVisible && !child.notRenderable) {\r\n if (this.adaptWidthToChildren && child._width.isPixel) {\r\n computedWidth = Math.max(computedWidth, child._currentMeasure.width + child._paddingLeftInPixels + child._paddingRightInPixels);\r\n }\r\n if (this.adaptHeightToChildren && child._height.isPixel) {\r\n computedHeight = Math.max(computedHeight, child._currentMeasure.height + child._paddingTopInPixels + child._paddingBottomInPixels);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (this.adaptWidthToChildren && computedWidth >= 0) {\r\n computedWidth += this.paddingLeftInPixels + this.paddingRightInPixels;\r\n if (this.width !== computedWidth + \"px\") {\r\n this.parent?._markAsDirty();\r\n this.width = computedWidth + \"px\";\r\n this._width.ignoreAdaptiveScaling = true;\r\n this._rebuildLayout = true;\r\n }\r\n }\r\n if (this.adaptHeightToChildren && computedHeight >= 0) {\r\n computedHeight += this.paddingTopInPixels + this.paddingBottomInPixels;\r\n if (this.height !== computedHeight + \"px\") {\r\n this.parent?._markAsDirty();\r\n this.height = computedHeight + \"px\";\r\n this._height.ignoreAdaptiveScaling = true;\r\n this._rebuildLayout = true;\r\n }\r\n }\r\n\r\n this._postMeasure();\r\n }\r\n rebuildCount++;\r\n } while (this._rebuildLayout && rebuildCount < this.maxLayoutCycle);\r\n\r\n if (rebuildCount >= 3 && this.logLayoutCycleErrors) {\r\n Logger.Error(`Layout cycle detected in GUI (Container name=${this.name}, uniqueId=${this.uniqueId})`);\r\n }\r\n\r\n context.restore();\r\n\r\n if (this._isDirty) {\r\n this.invalidateRect();\r\n\r\n this._isDirty = false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n protected override _postMeasure() {\r\n // Do nothing by default\r\n }\r\n\r\n private _inverseTransformMatrix = Matrix2D.Identity();\r\n private _inverseMeasure = new Measure(0, 0, 0, 0);\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _draw(context: ICanvasRenderingContext, invalidatedRectangle?: Measure): void {\r\n const renderToIntermediateTextureThisDraw = this._renderToIntermediateTexture && this._intermediateTexture;\r\n const contextToDrawTo = renderToIntermediateTextureThisDraw ? (<DynamicTexture>this._intermediateTexture).getContext() : context;\r\n\r\n if (renderToIntermediateTextureThisDraw) {\r\n contextToDrawTo.save();\r\n contextToDrawTo.translate(-this._currentMeasure.left, -this._currentMeasure.top);\r\n if (invalidatedRectangle) {\r\n this._transformMatrix.invertToRef(this._inverseTransformMatrix);\r\n invalidatedRectangle.transformToRef(this._inverseTransformMatrix, this._inverseMeasure);\r\n contextToDrawTo.clearRect(this._inverseMeasure.left, this._inverseMeasure.top, this._inverseMeasure.width, this._inverseMeasure.height);\r\n } else {\r\n contextToDrawTo.clearRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);\r\n }\r\n }\r\n\r\n this._localDraw(contextToDrawTo);\r\n\r\n context.save();\r\n\r\n if (this.clipChildren) {\r\n this._clipForChildren(contextToDrawTo);\r\n }\r\n\r\n for (const child of this._children) {\r\n // Only redraw parts of the screen that are invalidated\r\n if (invalidatedRectangle) {\r\n if (!child._intersectsRect(invalidatedRectangle)) {\r\n continue;\r\n }\r\n }\r\n child._render(contextToDrawTo, invalidatedRectangle);\r\n }\r\n\r\n if (renderToIntermediateTextureThisDraw) {\r\n contextToDrawTo.restore();\r\n context.save();\r\n context.globalAlpha = this.alpha;\r\n context.drawImage(contextToDrawTo.canvas, this._currentMeasure.left, this._currentMeasure.top);\r\n context.restore();\r\n }\r\n\r\n context.restore();\r\n }\r\n\r\n public override getDescendantsToRef(results: Control[], directDescendantsOnly: boolean = false, predicate?: (control: Control) => boolean): void {\r\n if (!this.children) {\r\n return;\r\n }\r\n\r\n for (let index = 0; index < this.children.length; index++) {\r\n const item = this.children[index];\r\n\r\n if (!predicate || predicate(item)) {\r\n results.push(item);\r\n }\r\n\r\n if (!directDescendantsOnly) {\r\n item.getDescendantsToRef(results, false, predicate);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _processPicking(\r\n x: number,\r\n y: number,\r\n pi: Nullable<PointerInfoBase>,\r\n type: number,\r\n pointerId: number,\r\n buttonIndex: number,\r\n deltaX?: number,\r\n deltaY?: number\r\n ): boolean {\r\n if (!this._isEnabled || !this.isVisible || this.notRenderable) {\r\n return false;\r\n }\r\n\r\n // checks if the picking position is within the container\r\n const contains = super.contains(x, y);\r\n\r\n // if clipChildren is off, we should still pass picking events to children even if we don't contain the pointer\r\n if (!contains && this.clipChildren) {\r\n return false;\r\n }\r\n\r\n if (this.delegatePickingToChildren) {\r\n let contains = false;\r\n for (let index = this._children.length - 1; index >= 0; index--) {\r\n const child = this._children[index];\r\n if (child.isEnabled && child.isHitTestVisible && child.isVisible && !child.notRenderable && child.contains(x, y)) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n return false;\r\n }\r\n }\r\n\r\n // Checking backwards to pick closest first\r\n for (let index = this._children.length - 1; index >= 0; index--) {\r\n const child = this._children[index];\r\n if (child._processPicking(x, y, pi, type, pointerId, buttonIndex, deltaX, deltaY)) {\r\n if (child.hoverCursor) {\r\n this._host._changeCursor(child.hoverCursor);\r\n }\r\n return true;\r\n }\r\n }\r\n\r\n if (!contains) {\r\n return false;\r\n }\r\n\r\n if (!this.isHitTestVisible) {\r\n return false;\r\n }\r\n\r\n return this._processObservables(type, x, y, pi, pointerId, buttonIndex, deltaX, deltaY);\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n protected override _additionalProcessing(parentMeasure: Measure, context: ICanvasRenderingContext): void {\r\n super._additionalProcessing(parentMeasure, context);\r\n\r\n this._measureForChildren.copyFrom(this._currentMeasure);\r\n }\r\n\r\n protected _getAdaptDimTo(dim: \"width\" | \"height\"): boolean {\r\n if (dim === \"width\") {\r\n return this.adaptWidthToChildren;\r\n } else {\r\n return this.adaptHeightToChildren;\r\n }\r\n }\r\n\r\n public override isDimensionFullyDefined(dim: \"width\" | \"height\"): boolean {\r\n if (this._getAdaptDimTo(dim)) {\r\n for (const child of this.children) {\r\n if (!child.isDimensionFullyDefined(dim)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n return super.isDimensionFullyDefined(dim);\r\n }\r\n\r\n /**\r\n * Serializes the current control\r\n * @param serializationObject defined the JSON serialized object\r\n * @param force force serialization even if isSerializable === false\r\n * @param allowCanvas defines if the control is allowed to use a Canvas2D object to serialize (true by default)\r\n */\r\n public override serialize(serializationObject: any, force: boolean = false, allowCanvas: boolean = true) {\r\n super.serialize(serializationObject, force, allowCanvas);\r\n if (!this.isSerializable && !force) {\r\n return;\r\n }\r\n\r\n if (this.backgroundGradient) {\r\n serializationObject.backgroundGradient = {};\r\n this.backgroundGradient.serialize(serializationObject.backgroundGradient);\r\n }\r\n\r\n if (!this.children.length) {\r\n return;\r\n }\r\n\r\n serializationObject.children = [];\r\n\r\n for (const child of this.children) {\r\n if (child.isSerializable || force) {\r\n const childSerializationObject = {};\r\n child.serialize(childSerializationObject, force, allowCanvas);\r\n serializationObject.children.push(childSerializationObject);\r\n }\r\n }\r\n }\r\n\r\n /** Releases associated resources */\r\n public override dispose() {\r\n super.dispose();\r\n\r\n for (let index = this.children.length - 1; index >= 0; index--) {\r\n this.children[index].dispose();\r\n }\r\n this._intermediateTexture?.dispose();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public override _parseFromContent(serializedObject: any, host: AdvancedDynamicTexture, urlRewriter?: (url: string) => string) {\r\n super._parseFromContent(serializedObject, host, urlRewriter);\r\n this._link(host);\r\n\r\n // Gradient\r\n if (serializedObject.backgroundGradient) {\r\n const className = Tools.Instantiate(\"BABYLON.GUI.\" + serializedObject.backgroundGradient.className);\r\n this._backgroundGradient = new className();\r\n this._backgroundGradient?.parse(serializedObject.backgroundGradient);\r\n }\r\n\r\n if (!serializedObject.children) {\r\n return;\r\n }\r\n\r\n for (const childData of serializedObject.children) {\r\n this.addControl(Control.Parse(childData, host, urlRewriter));\r\n }\r\n }\r\n\r\n public override isReady(): boolean {\r\n for (const child of this.children) {\r\n if (!child.isReady()) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n}\r\nRegisterClass(\"BABYLON.GUI.Container\", Container);\r\n"]}