Skip to main content

follow_point_edit

Function follow_point_edit 

Source
pub fn follow_point_edit(
    base: &Value,
    after: &mut Value,
) -> Result<Vec<PinPointChange>, String>
Expand description

The user edited the CONNECTION POINTS (a point renamed, added or deleted): carry the change between base and after to the pins and pads of after.

The two sides are symmetric: a point’s name is its identity exactly as a pin’s label is, so this runs the same positional diff the other way, one group against one unit’s pins. A renamed point relabels the pin base paired with it, a point that is gone removes its pin, and a point this edit brought gets a pin below the others unless a pin of that unit already carries its name. Pads follow a rename.

Err holds the edit (see the module docs) and leaves after untouched.