|
@@ -128,6 +128,12 @@ export class Control {
|
|
|
public clipChildren = true;
|
|
|
|
|
|
/**
|
|
|
+ * Gets or sets a boolean indicating that control content must be clipped
|
|
|
+ * Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
|
|
|
+ */
|
|
|
+ public clipContent = true;
|
|
|
+
|
|
|
+ /**
|
|
|
* Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)
|
|
|
*/
|
|
|
public useBitmapCache = false;
|
|
@@ -1589,9 +1595,9 @@ export class Control {
|
|
|
this._transform(context);
|
|
|
|
|
|
// Clip
|
|
|
- // if (this.clipChildren) {
|
|
|
- this._clip(context, invalidatedRectangle);
|
|
|
- // }
|
|
|
+ if (this.clipContent) {
|
|
|
+ this._clip(context, invalidatedRectangle);
|
|
|
+ }
|
|
|
|
|
|
if (this.onBeforeDrawObservable.hasObservers()) {
|
|
|
this.onBeforeDrawObservable.notifyObservers(this);
|