Skip to content

Commit

Permalink
https://github.com/silexlabs/Cocktail/issues/419
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabricio Gonçalves committed Sep 22, 2014
1 parent 9e8d232 commit e534550
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cocktail/port/platform/flash_player/MouseListener.hx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ class MouseListener extends MouseListenerBase
var mouseEvent:MouseEvent = new MouseEvent();

var localPoint:Point = new Point(typedEvent.localX, typedEvent.localY);
localPoint = _platform.convertToHitTestingSpriteSpace(localPoint, event.target, _platform.hitTestingSprite);
var hasGetTargtMethod:Bool = Reflect.hasField(event, "get_target");
var targetDisplayObject = hasGetTargtMethod ? event.get_target() : event.target;
localPoint = _platform.convertToHitTestingSpriteSpace(localPoint, targetDisplayObject, _platform.hitTestingSprite);

//use local x and y for mouse event, as they should be relative to hit testing sprite which represents
//the viewport of the document
Expand Down

0 comments on commit e534550

Please sign in to comment.