|
@@ -71,7 +71,7 @@ let maxImageWidth = 0;
|
|
|
|
|
|
function addTrackColorAttr(tList: Track[]): Track[] {
|
|
|
let markerIds: (number | undefined)[] = tList
|
|
|
- .map((v) => v.markerId)
|
|
|
+ .map((v) => v.userId)
|
|
|
.filter((x) => !!x);
|
|
|
markerIds = Array.from(new Set(markerIds));
|
|
|
// markerIds.sort();
|
|
@@ -90,7 +90,7 @@ function addTrackColorAttr(tList: Track[]): Track[] {
|
|
|
emit("getIsMultComments", true);
|
|
|
}
|
|
|
tList = tList.map((item: Track) => {
|
|
|
- item.color = colorMap[item.markerId + ""] || "red";
|
|
|
+ item.color = colorMap[item.userId + ""] || "red";
|
|
|
item.isByMultMark = markerIds.length > 1;
|
|
|
return item;
|
|
|
});
|
|
@@ -99,7 +99,7 @@ function addTrackColorAttr(tList: Track[]): Track[] {
|
|
|
|
|
|
function addTagColorAttr(tList: SpecialTag[]): SpecialTag[] {
|
|
|
let markerIds: (number | undefined)[] = tList
|
|
|
- .map((v) => v.markerId)
|
|
|
+ .map((v) => v.userId)
|
|
|
.filter((x) => !!x);
|
|
|
markerIds = Array.from(new Set(markerIds));
|
|
|
// markerIds.sort();
|
|
@@ -115,7 +115,7 @@ function addTagColorAttr(tList: SpecialTag[]): SpecialTag[] {
|
|
|
}
|
|
|
}
|
|
|
tList = tList.map((item: SpecialTag) => {
|
|
|
- item.color = colorMap[item.markerId + ""] || "red";
|
|
|
+ item.color = colorMap[item.userId + ""] || "red";
|
|
|
item.isByMultMark = markerIds.length > 1;
|
|
|
return item;
|
|
|
});
|
|
@@ -134,19 +134,21 @@ async function processImage() {
|
|
|
|
|
|
maxImageWidth = Math.max(...images.map((i) => i.naturalWidth));
|
|
|
|
|
|
+ const trackLists = (store.currentTask.questionList || [])
|
|
|
+ // .map((q) => q.trackList)
|
|
|
+ .map((q) => {
|
|
|
+ let tList = q.trackList;
|
|
|
+ return q.headerTrack?.length
|
|
|
+ ? addHeaderTrackColorAttr(q.headerTrack)
|
|
|
+ : addTrackColorAttr(tList);
|
|
|
+ })
|
|
|
+ .flat();
|
|
|
+ store.setting.doubleTrack = trackLists.some((item) => item.isByMultMark);
|
|
|
+
|
|
|
for (const url of urls) {
|
|
|
const indexInSliceUrls = urls.indexOf(url) + 1;
|
|
|
const image = images[indexInSliceUrls - 1];
|
|
|
|
|
|
- const trackLists = (store.currentTask.questionList || [])
|
|
|
- // .map((q) => q.trackList)
|
|
|
- .map((q) => {
|
|
|
- let tList = q.trackList;
|
|
|
- return q.headerTrack?.length
|
|
|
- ? addHeaderTrackColorAttr(q.headerTrack)
|
|
|
- : addTrackColorAttr(tList);
|
|
|
- })
|
|
|
- .flat();
|
|
|
const thisImageTrackList = trackLists.filter(
|
|
|
(t) => t.offsetIndex === indexInSliceUrls
|
|
|
);
|