-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix NAD branch width when zooming in Microsoft Edge #114
Conversation
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
@@ -9,77 +9,67 @@ export enum THRESHOLD_STATUS { | |||
BELOW = 'BELOW', | |||
ABOVE = 'ABOVE', | |||
} | |||
export type CSS_DECLARATION = Record<string, string>; | |||
|
|||
export type CSS_DECLARATION = Record<string, (value: number) => string>; |
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.
export type CSS_DECLARATION = Record<string, (value: number) => string>; | |
export type CSS_DECLARATION = Record<string, ((value: number) => string) | string>; |
then use CSS_DECLARATION instead of Record<string, string> ?
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.
For updateSvgCssDisplayValue function, the type should be Record<string, string> or we have to consider both cases of string and (value: number) => string.
Instead, I kept the old CSS_DECLERATION type as Record<string, string> and added a new type DYNAMIC_CSS_DECLARATION = Record<string, ((value: number) => string) | string>; which gives the user the freedom to use a function or a value
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
src/components/network-area-diagram-viewer/dynamic-css-utils.ts
Outdated
Show resolved
Hide resolved
src/components/network-area-diagram-viewer/network-area-diagram-viewer.ts
Outdated
Show resolved
Hide resolved
src/components/network-area-diagram-viewer/network-area-diagram-viewer.ts
Outdated
Show resolved
Hide resolved
src/components/network-area-diagram-viewer/network-area-diagram-viewer.ts
Outdated
Show resolved
Hide resolved
src/components/network-area-diagram-viewer/network-area-diagram-viewer.ts
Outdated
Show resolved
Hide resolved
src/components/network-area-diagram-viewer/network-area-diagram-viewer.ts
Outdated
Show resolved
Hide resolved
'CSS Rule ' + | ||
rule.cssSelector + | ||
' above threshold ' + | ||
maxDisplayedSize + | ||
' >= ' + | ||
rule.threshold |
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.
Same thing, we should remove this log.
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.
removed
src/components/network-area-diagram-viewer/network-area-diagram-viewer.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
…sybl-diagram-viewer into fix_nad_branch_edges Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Quality Gate passedIssues Measures |
Another solution was merged. This is now obsolete. |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Bug Fix: When using Microsoft Edge, CSS rules for branch width do not apply when zooming in NAD. The behivior. the behavior is fixed at the slightest movement of the svg, but when zooming without moving the svg, the width of the branches does not change dynamically as expected
Does this PR introduce a breaking change or deprecate an API?