-
Notifications
You must be signed in to change notification settings - Fork 13
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
[SLD] 237 animate feeder arrows #500
Conversation
Breaking changes is raised here by adding new parameter into |
c6ec577
to
5c2733c
Compare
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.
Thank you for your work so far. We must clear up some specifications for you to be able to go on with the development.
Moreover, we did not realize at first that this feature could bring a breaking change.
@@ -46,6 +46,14 @@ public final class DiagramStyles { | |||
public static final String ANGLE = STYLE_PREFIX + "angle"; | |||
public static final String FEEDER_INFO = STYLE_PREFIX + "feeder-info"; | |||
|
|||
public static final String ARROW_ANIMATION = STYLE_PREFIX + "arrow-animation"; | |||
|
|||
public static final String ARROW_ANIMATION_SPEED_1 = STYLE_PREFIX + "arrow-animation-speed-1"; |
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.
We have to decide how to discretize the power values and maybe include "no value" or "zero power" cases.
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 made very few comments. Thank you for your nice work!
...le-line-diagram-core/src/main/java/com/powsybl/sld/util/AnimatedFeederInfoStyleProvider.java
Outdated
Show resolved
Hide resolved
single-line-diagram/single-line-diagram-core/src/main/resources/animations.css
Outdated
Show resolved
Hide resolved
0e41afc
to
bcbdcb5
Compare
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.
Everything is OK for me!
.sld-arrow-animation-low-speed { --sld-arrow-animation-parameters: 3s infinite linear } | ||
.sld-arrow-animation-average-speed { --sld-arrow-animation-parameters: 2s infinite linear } | ||
.sld-arrow-animation-high-speed { --sld-arrow-animation-parameters: 1s infinite linear } | ||
.sld-arrow-animation-no-speed { --sld-arrow-offset-path: path('') } |
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.
You could do it simpler by using a not operator instead of introducing one more variable --sld-arrow-offset-path
, for instance:
.sld-cell-direction-top .sld-arrow-in :.sld-arrow-animation-no-speed {
offset-rotate: 0deg;
offset-path: path('M 0,-10 0,10');
animation: move var(--sld-arrow-animation-parameters, 0s);
}
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.
This file is not working on my firefox 96.0, the bottom black arrow is pointing to the top instead of to the bottom. It seems that the rotate is overriden. But in the specifications it is written that:
Note: The rotation described here does not override or replace any rotation defined by the transform property.
So, if it still occurs on a more recent version of firefox, we should report it to mozilla bug report.
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.
On Firefox ESR 102.9.0 (March 14, 2023) same issue
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 for testing!
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
…nts library Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
…tion Signed-off-by: Thomas ADAM <tadam@silicom.fr>
59bc015
to
67f8f01
Compare
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
67f8f01
to
2f3b9ca
Compare
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.
Just 2 typos and we're good!
@@ -0,0 +1,75 @@ | |||
/** | |||
* Copyright (c) 2019, RTE (http://www.rte-france.com) |
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.
Replace with 2023. Besides we've been asked to add * SPDX-License-Identifier: MPL-2.0
at the end to ease up license scanning
network.getLoad("l2").getTerminal().setP(501.0); | ||
network.getLoad("l2").getTerminal().setQ(0.0); | ||
|
||
// Enable animation |
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.
You can remove this comment
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Kudos, SonarCloud Quality Gate passed! |
* Use new AnimatedFeederInfoStyleProvider for animation * Add 2 thresholds in AnimatedFeederInfoStyleProvider constructor * Update svg test reference files * HvdcTest : fix svg generation at any time Signed-off-by: Thomas ADAM <tadam@silicom.fr> Signed-off-by: BenoitJeanson <benoit.jeanson@rte-france.com>
* Use new AnimatedFeederInfoStyleProvider for animation * Add 2 thresholds in AnimatedFeederInfoStyleProvider constructor * Update svg test reference files * HvdcTest : fix svg generation at any time Signed-off-by: Thomas ADAM <tadam@silicom.fr>
* Use new AnimatedFeederInfoStyleProvider for animation * Add 2 thresholds in AnimatedFeederInfoStyleProvider constructor * Update svg test reference files * HvdcTest : fix svg generation at any time Signed-off-by: Thomas ADAM <tadam@silicom.fr>
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the rest#237