(cards = this.getVisibleDropCards())
| 1171 | } |
| 1172 | |
| 1173 | private captureDropBaseline(cards = this.getVisibleDropCards()): void { |
| 1174 | if (!this.itemsContainer) { |
| 1175 | this.dragBaselineCards = []; |
| 1176 | return; |
| 1177 | } |
| 1178 | |
| 1179 | const containerRect = this.itemsContainer.getBoundingClientRect(); |
| 1180 | const scrollTop = this.itemsContainer.scrollTop; |
| 1181 | this.dragBaselineCards = cards |
| 1182 | .map((card) => { |
| 1183 | const path = card.dataset.taskPath; |
| 1184 | if (!path) return null; |
| 1185 | const rect = card.getBoundingClientRect(); |
| 1186 | const top = rect.top - containerRect.top + scrollTop; |
| 1187 | return { |
| 1188 | path, |
| 1189 | groupKey: this.taskGroupKeys.get(path) ?? null, |
| 1190 | card, |
| 1191 | top, |
| 1192 | bottom: top + rect.height, |
| 1193 | midpoint: top + rect.height / 2, |
| 1194 | }; |
| 1195 | }) |
| 1196 | .filter((entry): entry is TaskListDropBaselineCard => !!entry); |
| 1197 | } |
| 1198 | |
| 1199 | private getDropBaselineCards(): TaskListDropBaselineCard[] { |
| 1200 | const cards = this.getVisibleDropCards(); |
no test coverage detected