Skip to content

Commit 91dd35c

Browse files
committed
Callout, Drawer: minor optimization for detecting if content is an IMeasureObject
1 parent 975bfc3 commit 91dd35c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/feathers/controls/Callout.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,10 @@ class Callout extends FeathersControl {
917917
}
918918

919919
var measureContent:IMeasureObject = null;
920-
if ((this._content is IMeasureObject)) {
921-
measureContent = cast this._content;
922-
}
923920
if (this._content != null) {
921+
if ((this._content is IMeasureObject)) {
922+
measureContent = cast this._content;
923+
}
924924
var oldIgnoreContentResize = this._ignoreContentResize;
925925
this._ignoreContentResize = true;
926926
MeasurementsUtil.resetFluidlyWithParentValues(this._contentMeasurements, this._content,

src/feathers/controls/Drawer.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,10 @@ class Drawer extends FeathersControl implements IOpenCloseToggle implements IFoc
547547
}
548548

549549
var measureContent:IMeasureObject = null;
550-
if ((this._content is IMeasureObject)) {
551-
measureContent = cast this._content;
552-
}
553550
if (this._content != null) {
551+
if ((this._content is IMeasureObject)) {
552+
measureContent = cast this._content;
553+
}
554554
var oldIgnoreContentResize = this._ignoreContentResize;
555555
this._ignoreContentResize = true;
556556
MeasurementsUtil.resetFluidlyWithParentValues(this._contentMeasurements, this._content, this.explicitWidth, this.explicitHeight,

0 commit comments

Comments
 (0)