On Fri, Aug 16, 2019 at 6:42 AM Brian Theado <[email protected]> wrote:
What are the rules which can be followed in order to safely deal with > positions during outline modification. *Edward or Vitalije or anyone > else, do you know?* > As Vitalije says" - Adding (or deleting) the last sibling will not change the position of any existing node. This includes adding/deleting the last top-level node. - If you can recast your algorithm in terms of vnodes, it will be impervious to changes in the outline. A pattern I use often for summarizing work is: 1. Create a summary node as the last top-level node. 2. Add clones as children of this summary node. This is, roughly speaking, how the clone-fine and git-diff commands work. Another possible pattern: 1. Create, say, an @dates node (somewhere) *first*, if it doesn't already exist. If you do create an @dates node, then call c.redraw, which will, in effect, recompute all positions. 2. Now that you have an @dates node, create your @date nodes as children of the @dates node. This will preserve all positions. HTH. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/CAMF8tS2L7zKSrEiPTujdfW8zHSbvg5q0zS_44tB5Tpbb-OT_%3DA%40mail.gmail.com.
