babylonjs-gui 7.15.0 → 7.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/babylon.gui.d.ts CHANGED
@@ -3942,7 +3942,11 @@ declare module BABYLON.GUI {
3942
3942
  /**
3943
3943
  * Wrap the text word-wise and clip the text when the text's height is larger than the Control.height, and shrink the last line with trailing … .
3944
3944
  */
3945
- WordWrapEllipsis = 3
3945
+ WordWrapEllipsis = 3,
3946
+ /**
3947
+ * Use HTML to wrap the text. This is the only mode that supports east-asian languages.
3948
+ */
3949
+ HTML = 4
3946
3950
  }
3947
3951
  /**
3948
3952
  * Class used to create text block control
@@ -3978,6 +3982,16 @@ declare module BABYLON.GUI {
3978
3982
  * Function used to split a string into words. By default, a string is split at each space character found
3979
3983
  */
3980
3984
  wordSplittingFunction: BABYLON.Nullable<(line: string) => string[]>;
3985
+ /**
3986
+ * This function will be called when a new HTML element is generated to be used for word wrapping.
3987
+ * This is only used when wrapping mode HTML is selected.
3988
+ * Using this function you can adjust word-break, overflow-wrap, hyphens, or any other CSS properties of the HTML element, language-dependent.
3989
+ */
3990
+ adjustWordWrappingHTMLElement: BABYLON.Nullable<(element: HTMLElement) => void>;
3991
+ /**
3992
+ * Gets or sets a boolean indicating if the HTML element generated for word wrapping should be reused or removed after each wrapping.
3993
+ */
3994
+ reuseHTMLForWordWrapping: boolean;
3981
3995
  /**
3982
3996
  * Return the line list (you may need to use the onLinesReadyObservable to make sure the list is ready)
3983
3997
  */
@@ -4103,6 +4117,8 @@ declare module BABYLON.GUI {
4103
4117
  protected _applyStates(context: BABYLON.ICanvasRenderingContext): void;
4104
4118
  private _linesTemp;
4105
4119
  protected _breakLines(refWidth: number, refHeight: number, context: BABYLON.ICanvasRenderingContext): object[];
4120
+ private _htmlElement;
4121
+ protected _parseHTMLText(refWidth: number, refHeight: number, context: BABYLON.ICanvasRenderingContext): string[];
4106
4122
  protected _parseLine(line: string | undefined, context: BABYLON.ICanvasRenderingContext): object;
4107
4123
  private _getCharsToRemove;
4108
4124
  protected _parseLineEllipsis(line: string | undefined, width: number, context: BABYLON.ICanvasRenderingContext): object;