babylonjs-gui 6.12.3 → 6.12.4
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 +4 -4
- package/babylon.gui.js +18 -10
- package/babylon.gui.js.map +1 -1
- package/babylon.gui.min.js +1 -1
- package/babylon.gui.min.js.map +1 -1
- package/babylon.gui.module.d.ts +8 -8
- package/package.json +2 -2
package/babylon.gui.d.ts
CHANGED
@@ -1595,9 +1595,9 @@ declare module BABYLON.GUI {
|
|
1595
1595
|
*/
|
1596
1596
|
_intersectsRect(rect: Measure, context?: BABYLON.ICanvasRenderingContext): boolean;
|
1597
1597
|
/** @internal */
|
1598
|
-
protected
|
1598
|
+
protected _computeAdditionalOffsetX(): number;
|
1599
1599
|
/** @internal */
|
1600
|
-
protected
|
1600
|
+
protected _computeAdditionalOffsetY(): number;
|
1601
1601
|
/** @internal */
|
1602
1602
|
invalidateRect(): void;
|
1603
1603
|
/**
|
@@ -3031,9 +3031,9 @@ declare module BABYLON.GUI {
|
|
3031
3031
|
constructor(name?: string | undefined);
|
3032
3032
|
protected _getTypeName(): string;
|
3033
3033
|
/** @internal */
|
3034
|
-
protected
|
3034
|
+
protected _computeAdditionalOffsetX(): number;
|
3035
3035
|
/** @internal */
|
3036
|
-
protected
|
3036
|
+
protected _computeAdditionalOffsetY(): number;
|
3037
3037
|
protected _getRectangleFill(context: BABYLON.ICanvasRenderingContext): string | CanvasGradient;
|
3038
3038
|
protected _localDraw(context: BABYLON.ICanvasRenderingContext): void;
|
3039
3039
|
protected _additionalProcessing(parentMeasure: Measure, context: BABYLON.ICanvasRenderingContext): void;
|
package/babylon.gui.js
CHANGED
@@ -5792,11 +5792,11 @@ var Control = /** @class */ (function () {
|
|
5792
5792
|
return true;
|
5793
5793
|
};
|
5794
5794
|
/** @internal */
|
5795
|
-
Control.prototype.
|
5795
|
+
Control.prototype._computeAdditionalOffsetX = function () {
|
5796
5796
|
return 0;
|
5797
5797
|
};
|
5798
5798
|
/** @internal */
|
5799
|
-
Control.prototype.
|
5799
|
+
Control.prototype._computeAdditionalOffsetY = function () {
|
5800
5800
|
return 0;
|
5801
5801
|
};
|
5802
5802
|
/** @internal */
|
@@ -5817,8 +5817,8 @@ var Control = /** @class */ (function () {
|
|
5817
5817
|
var rightShadowOffset = Math.max(Math.max(shadowOffsetX, 0) + shadowBlur * 2, 0);
|
5818
5818
|
var topShadowOffset = Math.min(Math.min(shadowOffsetY, 0) - shadowBlur * 2, 0);
|
5819
5819
|
var bottomShadowOffset = Math.max(Math.max(shadowOffsetY, 0) + shadowBlur * 2, 0);
|
5820
|
-
var offsetX = this.
|
5821
|
-
var offsetY = this.
|
5820
|
+
var offsetX = this._computeAdditionalOffsetX();
|
5821
|
+
var offsetY = this._computeAdditionalOffsetY();
|
5822
5822
|
this.host.invalidateRect(Math.floor(this._tmpMeasureA.left + leftShadowOffset - offsetX), Math.floor(this._tmpMeasureA.top + topShadowOffset - offsetY), Math.ceil(this._tmpMeasureA.left + this._tmpMeasureA.width + rightShadowOffset + offsetX), Math.ceil(this._tmpMeasureA.top + this._tmpMeasureA.height + bottomShadowOffset + offsetY));
|
5823
5823
|
}
|
5824
5824
|
};
|
@@ -12484,20 +12484,28 @@ var Rectangle = /** @class */ (function (_super) {
|
|
12484
12484
|
return "Rectangle";
|
12485
12485
|
};
|
12486
12486
|
/** @internal */
|
12487
|
-
Rectangle.prototype.
|
12487
|
+
Rectangle.prototype._computeAdditionalOffsetX = function () {
|
12488
|
+
var additionalWidth = 0;
|
12488
12489
|
if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {
|
12489
12490
|
// Take in account the aliasing
|
12490
|
-
|
12491
|
+
additionalWidth += 1;
|
12491
12492
|
}
|
12492
|
-
|
12493
|
+
if (this.thickness) {
|
12494
|
+
additionalWidth += this.thickness / 2;
|
12495
|
+
}
|
12496
|
+
return additionalWidth;
|
12493
12497
|
};
|
12494
12498
|
/** @internal */
|
12495
|
-
Rectangle.prototype.
|
12499
|
+
Rectangle.prototype._computeAdditionalOffsetY = function () {
|
12500
|
+
var additionalHeight = 0;
|
12496
12501
|
if (this._cornerRadius[0] !== 0 || this._cornerRadius[1] !== 0 || this._cornerRadius[2] !== 0 || this._cornerRadius[3] !== 0) {
|
12497
12502
|
// Take in account the aliasing
|
12498
|
-
|
12503
|
+
additionalHeight += 1;
|
12499
12504
|
}
|
12500
|
-
|
12505
|
+
if (this.thickness) {
|
12506
|
+
additionalHeight += this.thickness / 2;
|
12507
|
+
}
|
12508
|
+
return additionalHeight;
|
12501
12509
|
};
|
12502
12510
|
Rectangle.prototype._getRectangleFill = function (context) {
|
12503
12511
|
return this._getBackgroundColor(context);
|