|
@@ -552,7 +552,7 @@ if (hasMarkResultToRender) {
|
|
|
if (!store.currentTask) return;
|
|
|
for (const sliceImage of sliceImagesWithTrackList) {
|
|
|
sliceImage.tagList = sliceImage.tagList.filter((t) =>
|
|
|
- store.currentTaskEnsured.markResult.specialTagList.find(
|
|
|
+ store.currentTaskEnsured.markResult?.specialTagList.find(
|
|
|
(st) =>
|
|
|
st.offsetIndex === t.offsetIndex &&
|
|
|
st.offsetX === t.offsetX &&
|
|
@@ -560,7 +560,7 @@ if (hasMarkResultToRender) {
|
|
|
)
|
|
|
);
|
|
|
}
|
|
|
- if (store.currentTaskEnsured.markResult.specialTagList.length === 0) {
|
|
|
+ if (store.currentTaskEnsured.markResult?.specialTagList.length === 0) {
|
|
|
for (const sliceImage of sliceImagesWithTrackList) {
|
|
|
sliceImage.tagList = [];
|
|
|
}
|
|
@@ -672,6 +672,42 @@ onUnmounted(() => {
|
|
|
// _topKB++;
|
|
|
// console.log(topKB);
|
|
|
// }, 1000);
|
|
|
+
|
|
|
+//#region autoScroll自动跳转
|
|
|
+let oldFirstScoreContainer: HTMLDivElement;
|
|
|
+watch(
|
|
|
+ () => store.currentTask,
|
|
|
+ () => {
|
|
|
+ if (!store.setting.autoScroll) {
|
|
|
+ // 给任务清理和动画留一点时间
|
|
|
+ oldFirstScoreContainer = document.querySelector(
|
|
|
+ ".score-container"
|
|
|
+ ) as HTMLDivElement;
|
|
|
+ addTimeout(scrollToFirstScore, 1000);
|
|
|
+ } else {
|
|
|
+ const container = document.querySelector(
|
|
|
+ ".mark-body-container"
|
|
|
+ ) as HTMLDivElement;
|
|
|
+ container.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
|
+ }
|
|
|
+ }
|
|
|
+);
|
|
|
+function scrollToFirstScore() {
|
|
|
+ if (renderLock) {
|
|
|
+ window.requestAnimationFrame(scrollToFirstScore);
|
|
|
+ }
|
|
|
+ addTimeout(() => {
|
|
|
+ const firstScore = document.querySelector(
|
|
|
+ ".score-container"
|
|
|
+ ) as HTMLDivElement;
|
|
|
+ if (firstScore) {
|
|
|
+ firstScore?.scrollIntoView({ behavior: "smooth" });
|
|
|
+ } else {
|
|
|
+ oldFirstScoreContainer?.scrollIntoView({ behavior: "smooth" });
|
|
|
+ }
|
|
|
+ }, 100);
|
|
|
+}
|
|
|
+//#endregion
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|