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
Add a basic switch tool as a very compact button to switch and show on/off values.
This can also be done using existing tools and adding animations depending on the on/off state like `transform: translateX()' to move the thumb, but it is not very user friendly.
(Optional): Suggested Solution
The solution uses standard svg objects, and a predefined animation:
rectangle to draw the track
rectangle to draw the thumb
This means that one can also style rectangle tracks and thumbs. Default is round as the default switch.
animations for on and off to move the thumb and switch the color for the track and thumb.
Note:
If a user wants to change the styling and more, he/she should define the full animation to overwrite the default animation.
Note 2:
There is still a bug in Merge.mergeDeep() which simply concatenates arrays, ie also animations. And the animations stop when a match is found, ie the first animation in the array...
This can be solved either by:
using an id to merge the array elements
continue to find a match in the animation array instead of stopping when a match is found
The text was updated successfully, but these errors were encountered:
The Problem To Be Solved
Add a basic switch tool as a very compact button to switch and show on/off values.
This can also be done using existing tools and adding animations depending on the on/off state like `transform: translateX()' to move the thumb, but it is not very user friendly.
(Optional): Suggested Solution
The solution uses standard svg objects, and a predefined animation:
This means that one can also style rectangle tracks and thumbs. Default is round as the default switch.
on
andoff
to move the thumb and switch the color for the track and thumb.Note:
If a user wants to change the styling and more, he/she should define the full animation to overwrite the default animation.
Note 2:
There is still a bug in Merge.mergeDeep() which simply concatenates arrays, ie also animations. And the animations stop when a match is found, ie the first animation in the array...
This can be solved either by:
The text was updated successfully, but these errors were encountered: