Remix.run Logo
DominikPeters 3 hours ago

It does support editing it if relative positioning is used in the code, i.e. if you drag the object it will continue being relatively positioned. But if you add new elements with the various tools, they will be absolutely positioned (not sure what would be a good UI for switching an element to relative positioning) unless you edit the source. You can try with

  \begin{tikzpicture}
    \node[draw] (A) at (0,0) {A};
    \node[draw, right of=A] (B) {B};
  \end{tikzpicture}
delta_p_delta_x 3 hours ago | parent [-]

> not sure what would be a good UI for switching an element to relative positioning

  1. Right-click on an existing object, offer drop-down context menu.
  2. Menu item `Position relative to...`.
  3. The cursor now selects _other_ objects in the field. 
     a. If there is no other object, then offer to create a new label-less node with (x,y); default to the origin.
     b. Once an object is selected, then offer `right of`, `left of`, `north of`, `south of`, `southeast of`, etc as a drop-down menu, and a field for radial displacement.
        i. As a stretch goal, offer a `Custom position...` button to specify an (x, y) displacement, or a polar angle and radial displacement. These three options (fixed offsets, Cartesian, polar) could also be tabs in the resultant menu from (b) above. 
You could use this same UI/UX for `anchor`, too.