1
0
Fork 0

[react] fix: Improve the inspect view (#323)

Improve visuals of the Xray path component

- Return null for hidden paths in the Path component. This fixes #266 and restores v3 behavior here. (An optional toggle to show hidden paths might be useful in the future.)
- Reverse animation direction in stroke-dashoffset. This ensures that the path animates in the internal direction, which is less confusing since you can hover over a path to check that it is counter-clockwise.

Also remove a duplicate array key.

Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/323
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Jonathan Haas <haasjona@gmail.com>
Co-committed-by: Jonathan Haas <haasjona@gmail.com>
This commit is contained in:
Jonathan Haas 2025-05-03 09:26:41 +00:00 committed by Joost De Cock
parent 415a6559d3
commit 83ff6b3b47
2 changed files with 6 additions and 3 deletions

View file

@ -81,7 +81,6 @@ export function menuUiPreferencesStructure() {
renderer: { renderer: {
dense: true, dense: true,
title: 'Pattern render engine', title: 'Pattern render engine',
about: 'Change the way the pattern is rendered on screen',
about: ( about: (
<span> <span>
Change the underlying method for rendering the pattern on screen. Change the underlying method for rendering the pattern on screen.

View file

@ -24,6 +24,10 @@ export const PathXray = ({
strings, strings,
drillProps = {}, drillProps = {},
}) => { }) => {
if (path.hidden) {
return null
}
/* /*
* We use the Path component from Pattern here * We use the Path component from Pattern here
* If we would extract Path from the components passed down, * If we would extract Path from the components passed down,
@ -76,8 +80,8 @@ export const PathXray = ({
> >
<animate <animate
attributeName="stroke-dashoffset" attributeName="stroke-dashoffset"
from="0" from="30"
to="30" to="0"
dur="2s" dur="2s"
repeatCount="indefinite" repeatCount="indefinite"
/> />