mirrorSymbolCommand function
CompoundCommand?
mirrorSymbolCommand(
- DraftDocument doc,
- Handle instance
The Mirror step for instance (D7), or null when it has no box.
Implementation
CompoundCommand? mirrorSymbolCommand(DraftDocument doc, Handle instance) {
final node = doc.tree[instance];
if (node is! InstanceNode) return null;
final box = boxOfDefinition(doc, node.definition);
if (box == null) return null;
return CompoundCommand(
[TransformNodeCommand(instance, mirroredAbout(node.transform, box))],
label: 'Mirror');
}