| | |
| | | // crnId: 15, |
| | | // pathId: 'el_1775197504724' |
| | | // }; |
| | | |
| | | // getTrackMask(map, rowIndex, colIndex) { |
| | | // const TRACK_N = 1; |
| | | // const TRACK_E = 2; |
| | | // const TRACK_S = 4; |
| | | // const TRACK_W = 8; |
| | | // const baseRow = map[rowIndex]; |
| | | // if (!baseRow) { |
| | | // return 0; |
| | | // } |
| | | // const base = baseRow[colIndex]; |
| | | // if (!this.isTrackType(base)) { |
| | | // return 0; |
| | | // } |
| | | // const rowSpan = base.rowSpan || 1; |
| | | // const colSpan = base.colSpan || 1; |
| | | // let mask = 0; |
| | | // const n = this.resolveMergedCell(map, rowIndex - 1, colIndex); |
| | | // const s = this.resolveMergedCell(map, rowIndex + rowSpan, colIndex); |
| | | // const w = this.resolveMergedCell(map, rowIndex, colIndex - 1); |
| | | // const e = this.resolveMergedCell(map, rowIndex, colIndex + colSpan); |
| | | // if (n && n !== base && this.isTrackType(n)) { |
| | | // mask |= TRACK_N; |
| | | // } |
| | | // if (e && e !== base && this.isTrackType(e)) { |
| | | // mask |= TRACK_E; |
| | | // } |
| | | // if (s && s !== base && this.isTrackType(s)) { |
| | | // mask |= TRACK_S; |
| | | // } |
| | | // if (w && w !== base && this.isTrackType(w)) { |
| | | // mask |= TRACK_W; |
| | | // } |
| | | // if (mask === 0) { |
| | | // mask = TRACK_E | TRACK_W; |
| | | // } |
| | | // return mask; |
| | | // }, |