protected setCursor(cursor: RailNode | undefined) {
    let id = cursor !== undefined ? cursor.get("id") : undefined;
    if (this.cursorOut !== undefined && this.cursorIn !== undefined) {
      this.cursorOut.merge("from", id);
      this.cursorIn.merge("to", id);