Skip to content

Commit

Permalink
Fix flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
D8H committed Oct 1, 2024
1 parent b50b933 commit cd0b3f1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Extensions/AnchorBehavior/anchorruntimebehavior.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ namespace gdjs {
owner: gdjs.RuntimeObject
) {
super(instanceContainer, behaviorData, owner);
this._relativeToOriginalWindowSize =
!!behaviorData.relativeToOriginalWindowSize;
this._relativeToOriginalWindowSize = !!behaviorData.relativeToOriginalWindowSize;
this._leftEdgeAnchor = behaviorData.leftEdgeAnchor;
this._rightEdgeAnchor = behaviorData.rightEdgeAnchor;
this._topEdgeAnchor = behaviorData.topEdgeAnchor;
Expand Down
3 changes: 1 addition & 2 deletions Extensions/TextObject/textruntimeobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ namespace gdjs {
*/
export class TextRuntimeObject
extends gdjs.RuntimeObject
implements gdjs.TextContainer, gdjs.OpacityHandler
{
implements gdjs.TextContainer, gdjs.OpacityHandler {
_characterSize: number;
_fontName: string;
_bold: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ export interface ChildRenderedInstance {
_pixiObject: { height: number };
getDefaultWidth(): number;
getDefaultHeight(): number;
getWidth(): number;
getHeight(): number;
getOriginX(): number;
getOriginY(): number;
update(): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,18 @@ class MockedChildRenderedInstance implements ChildRenderedInstance {
this.heightAfterUpdate = defaultHeight;
}

getWidth(): number {
return this._instance.hasCustomSize()
? this._instance.getCustomWidth()
: this.getDefaultWidth();
}

getHeight(): number {
return this._instance.hasCustomSize()
? this._instance.getCustomHeight()
: this.getDefaultHeight();
}

getDefaultWidth(): number {
return this.defaultWidth;
}
Expand Down

0 comments on commit cd0b3f1

Please sign in to comment.