Skip to content
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

Is the css modifier supported? (in animation) #185

Open
billbrod opened this issue Nov 11, 2024 · 0 comments
Open

Is the css modifier supported? (in animation) #185

billbrod opened this issue Nov 11, 2024 · 0 comments

Comments

@billbrod
Copy link

I have been unable to get the css modifier to work. I copied the animate demo and modified a small portion, to see if I could get it working, and no animation happens.

### Graphical solution procedure

<span class="fragment appear-disappear"></span>

<div data-animate data-load="animate/linear_program.svg">
<!--
{
"animation": [
[],
[
{
"element": "#y_geq_0",
"modifier": "css",
"parameters": [ {"fill": "red"} ]
},
{
"element": "#horizontal_gridline0",
"modifier": "attr",
"duration": 1500,
"parameters": [ { "d": "M 0,210 L 800,690" } ]
},
{
"element": "#y_geq_0",
"modifier": "opacity",
"parameters": [ 0 ]
}
]
]
}
-->
</div>

If instead I do

{
"element": "#y_geq_0",
- "modifier": "css",
- "parameters": [ {"fill": "red"} ]
+ "modifier": "opacity",
+ "parameters": [ 0 ]
},

as in the original demo, the animation happens without an issue.

I have also confirmed that running SVG(#y_geq_0).css({'fill': 'red'}) from the browser console has an effect.

Is css unsupported or am I doing something incorrectly?

I appreciate any help you can offer!

@billbrod billbrod changed the title Does the css modifier work Is the css modifier supported? Nov 11, 2024
@billbrod billbrod changed the title Is the css modifier supported? Is the css modifier supported? (in animation) Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant