feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
914 stars 386 forks source link

Fix cast in AnchorLayout.as to use correct interface #1807

Closed dubspeed closed 3 years ago

dubspeed commented 3 years ago

positionVertically() and positionHorizintally() should cast the item to IMeasureDisplayObject instead of IFeathersControl, since they do not utilize anything from that interface.

Since IFeathersControl inherits IMeasureDisplayObject this works, however this fix allows custom classes to be layouted via AnchorLayout as well (e.g. ImageSkin) wihtout the full FeathersControl implementation.

joshtynjala commented 3 years ago

It's very likely that I wrote that code before IMeasureDisplayObject existed, so it was an easy thing to miss! Thank you!