|
@@ -36,6 +36,7 @@ module BABYLON.GUI {
|
|
|
private _transformMatrix = Matrix2D.Identity();
|
|
|
protected _invertTransformMatrix = Matrix2D.Identity();
|
|
|
protected _transformedPosition = Vector2.Zero();
|
|
|
+ private _onlyMeasureMode = false;
|
|
|
private _isMatrixDirty = true;
|
|
|
private _cachedOffsetX: number;
|
|
|
private _cachedOffsetY: number;
|
|
@@ -567,6 +568,7 @@ module BABYLON.GUI {
|
|
|
this.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT;
|
|
|
this.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP;
|
|
|
this._linkedMesh = mesh;
|
|
|
+ this._onlyMeasureMode = true;
|
|
|
this._host._linkedControls.push(this);
|
|
|
}
|
|
|
|
|
@@ -701,6 +703,11 @@ module BABYLON.GUI {
|
|
|
// Transform
|
|
|
this._transform(context);
|
|
|
|
|
|
+ if (this._onlyMeasureMode) {
|
|
|
+ this._onlyMeasureMode = false;
|
|
|
+ return false; // We do not want rendering for this frame as they are measure dependant information that need to be gathered
|
|
|
+ }
|
|
|
+
|
|
|
// Clip
|
|
|
this._clip(context);
|
|
|
context.clip();
|