You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the size property of the component resizes the icon.
Current Behavior
The icon disappears if animate={false} was specified.
Detailed Description
This behavior only happens on non animated icons.
On animated icons, the draw() function in skycons.js get's called at an interval, and if resizeClear: true is not specified it will redraw based on canvas size. As a result, animated icons will always resize properly, even though size is not a dependency of the useEffect hook.
Context
This a result of #15 I submitted to refactor the component. Hence, I'm sending another to fix this soon.
Possible Implementation
Adding the size as a dependency is the easiest solution.
Also the class should be instantiated with resizeClear: true since not specifying it now is redundant.
I am aware that this is somewhat sub-optimal but after spending some time implementing a resize method, I believe this is the safest way to go without major refactors.
The text was updated successfully, but these errors were encountered:
Expected Behavior
Changing the
size
property of the component resizes the icon.Current Behavior
The icon disappears if
animate={false}
was specified.Detailed Description
This behavior only happens on non animated icons.
On animated icons, the
draw()
function inskycons.js
get's called at an interval, and ifresizeClear: true
is not specified it will redraw based on canvas size. As a result, animated icons will always resize properly, even thoughsize
is not a dependency of theuseEffect
hook.Context
This a result of #15 I submitted to refactor the component. Hence, I'm sending another to fix this soon.
Possible Implementation
Adding the
size
as a dependency is the easiest solution.Also the class should be instantiated with
resizeClear: true
since not specifying it now is redundant.I am aware that this is somewhat sub-optimal but after spending some time implementing a resize method, I believe this is the safest way to go without major refactors.
The text was updated successfully, but these errors were encountered: