Merge with another move command.
(self, other: CommandBase)
| 659 | abs(other.timestamp - self.timestamp) < 1.0) # Within 1 second |
| 660 | |
| 661 | def merge_with(self, other: CommandBase) -> Optional[CommandBase]: |
| 662 | """Merge with another move command.""" |
| 663 | if not self.can_merge_with(other): |
| 664 | return None |
| 665 | |
| 666 | # Create merged command using original start position and latest end position |
| 667 | return MoveNodeCommand( |
| 668 | self.node_graph, |
| 669 | self.node, |
| 670 | self.old_position, |
| 671 | other.new_position |
| 672 | ) |