mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 18:25:34 +01:00
The canvas kept the selection's outlines, anchors and dots only while the document revision stayed the same, so every move command, nudge and drag step built them again from every selected object. With 10,000 selected rectangles one build took about 26 ms in a release build. A move of whole objects now records the documents before and after it and the distance (DocState::moved). The record is made only when each moved object is still the node the transform left (no later pass, such as the pixel grid snap, changed it), none is a member of a blend, and every object the selection shows, the key object and the key anchor's object included, is a moved object or inside one. Copies, scales, moves of patterns alone and moves that resize type areas make no record. The canvas moves its kept marks by that distance when the record names the document they show, or the document a drag began with. It also keeps them through a new revision of the same document and selection, as at the end of a drag. Every other change builds them as before.