pub struct FlowNoteCanvasPosition {
pub lr: Option<Box<FlowNoteCanvasPositionLr>>,
pub td: Option<Box<FlowNoteCanvasPositionTd>>,
}Expand description
FlowNoteCanvasPosition : Orientation-aware position for the DAG canvas (#1727 part 2), in that canvas’s own auto-laid-out coordinate space for the given orientation — the exact xyflow node position at the moment the note was last dragged (see dagGraph.ts’s placeFreeNotes, which reads it back as-is), NOT a position relative to the flow’s bounding box. It stays sensibly placed across an edit that doesn’t change the flow’s own layout, but a structural change that shifts everything (a step inserted upstream, an orientation-independent reflow) can leave it stale, same as any other absolute coordinate would; unlike position (authored against the legacy canvas’s own absolute layout, which has no relationship to this canvas’s auto-computed one at all — a stronger mismatch than a merely-stale one). Two independent slots because LR and TD are different layouts with different coordinate spaces — a position that made sense in one orientation can fall outside the flow, or on top of a node, in the other. Both optional and independent: a note dragged only in LR has no td entry, and auto-places (the existing strip layout) for TD until the user drags it there too.
Fields§
§lr: Option<Box<FlowNoteCanvasPositionLr>>§td: Option<Box<FlowNoteCanvasPositionTd>>Implementations§
Source§impl FlowNoteCanvasPosition
impl FlowNoteCanvasPosition
Sourcepub fn new() -> FlowNoteCanvasPosition
pub fn new() -> FlowNoteCanvasPosition
Orientation-aware position for the DAG canvas (#1727 part 2), in that canvas’s own auto-laid-out coordinate space for the given orientation — the exact xyflow node position at the moment the note was last dragged (see dagGraph.ts’s placeFreeNotes, which reads it back as-is), NOT a position relative to the flow’s bounding box. It stays sensibly placed across an edit that doesn’t change the flow’s own layout, but a structural change that shifts everything (a step inserted upstream, an orientation-independent reflow) can leave it stale, same as any other absolute coordinate would; unlike position (authored against the legacy canvas’s own absolute layout, which has no relationship to this canvas’s auto-computed one at all — a stronger mismatch than a merely-stale one). Two independent slots because LR and TD are different layouts with different coordinate spaces — a position that made sense in one orientation can fall outside the flow, or on top of a node, in the other. Both optional and independent: a note dragged only in LR has no td entry, and auto-places (the existing strip layout) for TD until the user drags it there too.