Fix regression in deletion
parent
04d8778a0e
commit
260f64248d
|
@ -575,8 +575,10 @@ export default {
|
||||||
|
|
||||||
// Add the photo to the row
|
// Add the photo to the row
|
||||||
const photo = data[dataIdx];
|
const photo = data[dataIdx];
|
||||||
photo.flag = 0; // flags
|
if (typeof photo.flag === "undefined") {
|
||||||
photo.d = day; // backref to day
|
photo.flag = 0; // flags
|
||||||
|
photo.d = day; // backref to day
|
||||||
|
}
|
||||||
this.list[rowIdx].photos.push(photo);
|
this.list[rowIdx].photos.push(photo);
|
||||||
dataIdx++;
|
dataIdx++;
|
||||||
|
|
||||||
|
@ -811,7 +813,7 @@ export default {
|
||||||
nextExit = true;
|
nextExit = true;
|
||||||
} else if (nextExit) {
|
} else if (nextExit) {
|
||||||
photo.flag |= constants.FLAG_EXIT_LEFT;
|
photo.flag |= constants.FLAG_EXIT_LEFT;
|
||||||
exitedLeft.add(photo.fileid);
|
exitedLeft.add(photo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -828,15 +830,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enter from right all photos that exited left
|
// Enter from right all photos that exited left
|
||||||
for (const day of updatedDays) {
|
exitedLeft.forEach((photo) => {
|
||||||
for (const row of day.rows) {
|
photo.flag &= ~constants.FLAG_EXIT_LEFT;
|
||||||
for (const photo of row.photos) {
|
photo.flag |= constants.FLAG_ENTER_RIGHT;
|
||||||
if (exitedLeft.has(photo.fileid)) {
|
});
|
||||||
photo.flag |= constants.FLAG_ENTER_RIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// clear selection at this point
|
// clear selection at this point
|
||||||
this.clearSelection();
|
this.clearSelection();
|
||||||
|
@ -845,13 +842,9 @@ export default {
|
||||||
await new Promise(resolve => setTimeout(resolve, 200));
|
await new Promise(resolve => setTimeout(resolve, 200));
|
||||||
|
|
||||||
// Clear enter right flags
|
// Clear enter right flags
|
||||||
for (const day of updatedDays) {
|
exitedLeft.forEach((photo) => {
|
||||||
for (const row of day.rows) {
|
photo.flag &= ~constants.FLAG_ENTER_RIGHT;
|
||||||
for (const photo of row.photos) {
|
});
|
||||||
photo.flag &= ~constants.FLAG_ENTER_RIGHT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reflow timeline
|
// Reflow timeline
|
||||||
this.reflowTimeline();
|
this.reflowTimeline();
|
||||||
|
|
Loading…
Reference in New Issue