diff --git a/src/as/com/threerings/flex/CommandMenu.as b/src/as/com/threerings/flex/CommandMenu.as index b83b60ab..b44a9b5b 100644 --- a/src/as/com/threerings/flex/CommandMenu.as +++ b/src/as/com/threerings/flex/CommandMenu.as @@ -93,8 +93,8 @@ public class CommandMenu extends ScrollableArrowMenu /** * Actually pop up the menu. This can be used instead of show(). */ - public function popUp ( - trigger :DisplayObject, popUpwards :Boolean = false) :void + public function popUp (trigger :DisplayObject, popUpwards :Boolean = false, + popLeftwards :Boolean = false) :void { var r :Rectangle = trigger.getBounds(trigger.stage); @@ -107,6 +107,11 @@ public class CommandMenu extends ScrollableArrowMenu // position it below the trigger show(r.x, r.y + r.height); } + + if (popLeftwards) { + // reposition the x now that we know our size + x = r.x + r.width - getExplicitOrMeasuredWidth(); + } } /**