You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I ask for an arrow given a located trail, I'd expect the arrow to follow that trail. Instead, what seems to happen is that we take the located trail's shape, then append an arrowhead to the end, and then scale and rotate the whole arrow such that it starts at the intended start, and such that the tip of the arrow is at the original trail's end. That seems wrong.
In the example below, the arrows are drawn from located trails between centers of grid cells.
What might help as a work-around is to shift the arrow-head back by its length, but I couldn't find a way to do that with the Arrows module.
The text was updated successfully, but these errors were encountered:
I agree this seems wrong, but it is tricky to figure out how to do "the right thing" in a way that works sensibly in all situations. Adjusting the end of the trail by the length of the arrowhead is relatively easy to do using Diagrams.Parametric.Adjust --- IF you know the length of the arrowhead. The problem is that arrowhead sizes can scale dynamically with the size of the diagram so it is impossible to know how big the arrowhead is going to be until late in the diagram compilation process. Still, at that point it should be possible to adjust the trail. But it is unclear what to do if (a) the trail is curved or (b) the arrowhead is longer than the final segment of the trail. Thoughts welcome!
Don't think I know enough about the diagrams internals or the background of the arrow library design to have concrete input. Two ideas, though:
I originally expected to be able to place arrow heads/tails similarly to setting line caps. I.e., allowing to style not just LineCap, but maybe also the LineEndCap/LineStartCap, with arrow caps.
For my own purposes, I'd be happy if there were some lower level of arrows library which would allow drawing arrows (or even just arrowheads) that aren't dynamically sized. If it's just arrow heads, some helper to easily align them to the end of a trail.
If I ask for an arrow given a located trail, I'd expect the arrow to follow that trail. Instead, what seems to happen is that we take the located trail's shape, then append an arrowhead to the end, and then scale and rotate the whole arrow such that it starts at the intended start, and such that the tip of the arrow is at the original trail's end. That seems wrong.
In the example below, the arrows are drawn from located trails between centers of grid cells.
What might help as a work-around is to shift the arrow-head back by its length, but I couldn't find a way to do that with the Arrows module.
The text was updated successfully, but these errors were encountered: