Skip to content

Commit

Permalink
fix recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
carolhmj committed Apr 11, 2023
1 parent 8255fd1 commit c58b5a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/dev/gui/src/2D/controls/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class Control implements IAnimatable {
@serialize()
public isFocusInvisible = false;

private _clipChildren = true;
protected _clipChildren = true;
/**
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
* 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
Expand All @@ -193,7 +193,7 @@ export class Control implements IAnimatable {
return this._clipChildren;
}

private _clipContent = true;
protected _clipContent = true;
/**
* Sets/Gets a boolean indicating that control content must be clipped
* Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
Expand Down
8 changes: 4 additions & 4 deletions packages/dev/gui/src/2D/controls/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class Grid extends Container {
* Please note that not clipping content may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children
*/
public set clipContent(value: boolean) {
this.clipContent = value;
this._clipContent = value;

// This value has to be replicated on all of the container cells
for (const key in this._cells) {
Expand All @@ -37,15 +37,15 @@ export class Grid extends Container {

@serialize()
public get clipContent(): boolean {
return this.clipContent;
return this._clipContent;
}

/**
* Sets/Gets a boolean indicating if the children are clipped to the current control bounds.
* 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 set clipChildren(value: boolean) {
this.clipChildren = value;
this._clipChildren = value;

// This value has to be replicated on all of the container cells
for (const key in this._cells) {
Expand All @@ -54,7 +54,7 @@ export class Grid extends Container {
}

public get clipChildren(): boolean {
return this.clipChildren;
return this._clipChildren;
}

/**
Expand Down

0 comments on commit c58b5a3

Please sign in to comment.