[starling] Don't perform hit test if SkeletonSprite is invisible or untouchable. Closes #1111

This commit is contained in:
badlogic 2018-05-15 11:20:51 +02:00
parent 8d087341ac
commit e632d4b94f
2 changed files with 2 additions and 0 deletions

View File

@ -226,6 +226,8 @@ package spine.starling {
}
override public function hitTest(localPoint : Point) : DisplayObject {
if (!this.visible || !this.touchable) return null;
var minX : Number = Number.MAX_VALUE, minY : Number = Number.MAX_VALUE;
var maxX : Number = -Number.MAX_VALUE, maxY : Number = -Number.MAX_VALUE;
var slots : Vector.<Slot> = skeleton.slots;