software-mansion / react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
MIT License
7.44k stars 1.12k forks source link

G component not being animated when x and y value changes #2009

Closed acollazomayer closed 2 months ago

acollazomayer commented 1 year ago

NB Never post screenshots of code. Post copy paste-able code if you include any. Ignoring this will likely lead to direct closing of the issue. Please respect the time and energy of open source maintainers.

Bug

G component not being able to be animated when using animated Props. Initial value of animated Props work however when they change its not being updated on screen.

Here is a repo with the issue replicated. Please note that this behaviour was working before updating to the latest version of the library. https://github.com/acollazomayer/ReanimatedSVGBug

Unexpected behavior

Environment info

Run react-native info in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project

React native info output:

System:
    OS: macOS 12.4
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
    Memory: 22.35 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.15.0 - /var/folders/41/k3fj_q050070cqcgf7jm5l9r0000gn/T/yarn--1679343685024-0.03313442609554107/node
    Yarn: 1.22.19 - /var/folders/41/k3fj_q050070cqcgf7jm5l9r0000gn/T/yarn--1679343685024-0.03313442609554107/yarn
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
    Watchman: 2023.03.13.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.4 => 0.71.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 13.8.0

Steps To Reproduce

Issues without reproduction steps or code are likely to stall.

  1. git clone https://github.com/acollazomayer/ReanimatedSVGBug
  2. cd ReanimatedSVGBug
  3. yarn
  4. cd ios && pod install
  5. yarn react-native run-ios
  6. Press on the white circle as the slider indicator
  7. Slide through the circle

Describe what you expected to happen:

  1. The meter should be able to move at the same time that the path is moving

Short, Self Contained, Correct (Compilable), Example

If you are having a problem with some code and seeking help, preparing a Short, Self Contained, Correct Example (SSCCE) is very useful. But what is an SSCCE?

It is all in the name, really. Take a look at each part. The version prepared for others to see should be:

Short (Small) - Minimise bandwidth for the example, do not bore the audience. Self Contained - Ensure everything is included, ready to go. Correct - Copy, paste, (compile,) see is the aim. Example - Displays the problem we are trying to solve.

http://www.sscce.org/

bohdanprog commented 3 months ago

Hello @acollazomayer, If I understood the problem correctly that means the issue is already solved.

https://github.com/software-mansion/react-native-svg/assets/69891500/d76a02b0-bc91-43c5-a1fd-76d307861a32