Bounds value for Sprite.startDrag procedure

Sprite.startDrag(lockCenter:Bool = false, ?bounds:Rectangle):Void

How can the bounds value that is passed in the call to startDrag procedure be accessed after calling startDrag. The bounds rectangle sets a “constraint rectangle for the Sprite” which I assume means that the Sprite cannot be dragged outside that rectangle. But when I set it, there doesn’t seem to be any constraints on where the sprite can be dragged. So I want to double check that it is actually being set.

Thanks in advance.

As far as I know, there’s no public API to get the bounds passed to startDrag().

It looks like it gets stored in the private __dragBounds property of the Stage object. For debugging purposes, you could probably access it like this:

var bounds = @:privateAccess stage.__dragBounds;