-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: update react-native-skia to 0.1.136 #31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Akinn! PR looks good to me, just 2 minor changes for the from
value that can't be null
src/AnimatedLineGraph.tsx
Outdated
@@ -89,11 +89,11 @@ export function AnimatedLineGraph({ | |||
}) | |||
|
|||
const previous = paths.current | |||
let from: SkPath = previous.to ?? straightLine | |||
let from: SkPath | null = previous.to ?? straightLine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
straightLine
can never be null
, so this can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interpolate
now can return null
interpolate type: (method) SkPath.interpolate(end: SkPath, weight: number): SkPath | null
so when you assign interpolate
result to from
, it can be null
https://github.com/margelo/react-native-graph/pull/31/files/00840df3ff16404aea00355f7092afada7c35c2d#diff-cfb3f852e9829282d769b73218a60d92f55779488387a3333b1c5717365419e9R94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But straightLine
is not using interpolate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, hmm this is a bit weird. We could do
from = from.interpolate(previous.from, interpolateProgress.current) ?? from
But that's weird either way. I got your point now
Does the point still move correctly with this PR? I'm seeing this: Screen.Recording.2022-07-20.at.11.59.37.mov |
@mrousavy Someone filed an issue for that here #26 (comment) |
Fixed on latest commit but a comment about it: on the first press on the graph, the circle starts in last position, so if is your first press after opening the app, the point will show on 0/0 UPDATE:Fixed here #32 |
Awesome, thank you Akinn! ❤️ |
Upgrades:
Changes:
Comments
I can't solve this types validation, seems to work for me as expected with
@ts-ignore
but please help me to solve it, I don't know how this workshttps://github.com/margelo/react-native-graph/compare/main...akinncar:feat/update-skia?expand=1#diff-cfb3f852e9829282d769b73218a60d92f55779488387a3333b1c5717365419e9R246