Closed johannes-wolf closed 1 month ago
Would it be easier to add anchors to the mark function? "tip", "center" and "inset" (or "base") could work
Would it be easier to add anchors to the mark function? "tip", "center" and "inset" (or "base") could work
As an addition? Because this feature is also useful when placing a mark on a path, e.g., in the center.
No, instead of using the origin
styling parameter. Anchors would functionally do the same thing but with predefined positions. Given the normal size of marks I don't think you would want such fine control it.
@fenjalien in such case how it would look like if I would like to use mark center as placement origin?
mark(..., anchor: "center")
, I guess.
Changed. You can now specify one of the anchors tip
, center
and base
to place the mark at. This also works with marks on paths.
Can we merge this?
@fenjalien Not sure about the name
origin
. The idea is to have a style key that shifts the mark origin along its (local) x-axis: 0% tip, 100% base.Fixes #578.