Open Bug 1424939 Opened 6 years ago Updated 2 years ago

The shapes path tool shouldn't follow animated elements

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: pbro, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [designer-tools])

Steps:

- load this URL in a tab: data:text/html,<style>div {width:300px;height:300px;background:red;animation:a 3s alternate infinite;}@keyframes a {from {clip-path:polygon(0 0, 50% 0, 100% 50%, 50% 100%, 0 100%);} to {clip-path:polygon(0 0, 100% 0, 100% 50%, 100% 100%, 0 100%);}}</style><div>
- open the inspector and select the <div>
- in the rule-view, you should see the @keyframes rule, with the clip-path property being animated
- click on the shapes editor icon in there and try and drag the points around

--> Nothing happens, you can't drag points around
And the following error is displayed in the browser console:

TypeError: this.coordUnits[point] is undefined  shapes.js:813:9

Now, there are several issues here:
- if the shape is moving, it's hard to grab the points, but I think this is another bug altogether. You can still use the animation panel to pause the animation. Another idea is that perhaps the shape should not auto-refresh and follow the shape. If you click on the icon in the 0% rule, then that particular shape should be highlighted, not the shape it currently is.

- if dragging a point worked, then we'd have to make the edit right inside the actual source rule (the 0% or 100%), not override it into a new inline style like we do today, cause that wouldn't impact the animation at all.
Bug 1435373 fixes the second problem described in comment 0. So let's just depend on it.

And Let's re-purpose this bug for the first problem only: while the element is being animated, the shape editor tool animates with it. This is making editing points impossible. And should really not happen.
Why? Because if you're updating the clip-path property of one of the animation keyframe rules, you're editing the shape at that particular point in time, not throughout the animation's duration.
So I believe the tool should appear at the position that his keyframe defines, and not move.
Depends on: 1435373
Priority: P2 → P3
Summary: The shapes path tool doesn't work when it is being animated → The shapes path tool shouldn't follow animated elements
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.