* Creates a new node with updated position (immutable) * 创建具有更新位置的新节点(不可变)
(newPosition: Position)
| 212 | * 创建具有更新位置的新节点(不可变) |
| 213 | */ |
| 214 | moveTo(newPosition: Position): GraphNode { |
| 215 | const node = this.clone(); |
| 216 | node._position = newPosition; |
| 217 | return node; |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Creates a new node with collapse state toggled (immutable) |
no test coverage detected