mirror of
https://github.com/rive-app/rive-flutter.git
synced 2025-06-27 02:07:12 +08:00
Consider artboard origin when computed artboard local coord.
This commit is contained in:
@ -189,7 +189,11 @@ class _RiveAnimationState extends State<RiveAnimation> {
|
|||||||
}
|
}
|
||||||
var globalCoordinates = renderObject.localToGlobal(local);
|
var globalCoordinates = renderObject.localToGlobal(local);
|
||||||
|
|
||||||
return riveRenderer!.globalToArtboard(globalCoordinates);
|
var artboardCoord = riveRenderer!.globalToArtboard(globalCoordinates);
|
||||||
|
|
||||||
|
return artboardCoord -
|
||||||
|
Vec2D.fromValues(_artboard!.originX * _artboard!.width,
|
||||||
|
_artboard!.originY * _artboard!.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _optionalHitTester(BuildContext context, Widget child) {
|
Widget _optionalHitTester(BuildContext context, Widget child) {
|
||||||
|
Reference in New Issue
Block a user