|
@@ -209,12 +209,12 @@ async function processSliceConfig() {
|
|
|
const indexInSliceUrls = sliceConfig.i;
|
|
|
const image = images[sliceConfig.i];
|
|
|
|
|
|
- const dataUrl = (await getDataUrlForSliceConfig(
|
|
|
+ const dataUrl = await getDataUrlForSliceConfig(
|
|
|
image,
|
|
|
sliceConfig,
|
|
|
maxSliceWidth,
|
|
|
url
|
|
|
- )) as string;
|
|
|
+ );
|
|
|
|
|
|
let trackLists = [] as Array<Track>;
|
|
|
if (useMarkResult) {
|
|
@@ -241,9 +241,9 @@ async function processSliceConfig() {
|
|
|
(t) => t.offsetIndex === indexInSliceUrls
|
|
|
);
|
|
|
|
|
|
- const sliceImageRendered = await getImageUsingDataUrl(dataUrl);
|
|
|
+ const sliceImageRendered = await getImageUsingDataUrl(dataUrl!);
|
|
|
tempSliceImagesWithTrackList.push({
|
|
|
- url: dataUrl,
|
|
|
+ url: dataUrl!,
|
|
|
indexInSliceUrls: sliceConfig.i,
|
|
|
// 通过positionY来定位是第几张slice的还原,并过滤出相应的track
|
|
|
trackList: thisImageTrackList.filter(
|
|
@@ -307,12 +307,12 @@ async function processSplitConfig() {
|
|
|
|
|
|
accumBottomHeight += image.naturalHeight;
|
|
|
|
|
|
- const dataUrl = (await getDataUrlForSplitConfig(
|
|
|
+ const dataUrl = await getDataUrlForSplitConfig(
|
|
|
image,
|
|
|
config,
|
|
|
maxSliceWidth,
|
|
|
url
|
|
|
- )) as string;
|
|
|
+ );
|
|
|
|
|
|
let trackLists = [] as Array<Track>;
|
|
|
if (useMarkResult) {
|
|
@@ -339,9 +339,9 @@ async function processSplitConfig() {
|
|
|
const thisImageTagList = tagLists.filter(
|
|
|
(t) => t.offsetIndex === indexInSliceUrls
|
|
|
);
|
|
|
- const sliceImageRendered = await getImageUsingDataUrl(dataUrl);
|
|
|
+ const sliceImageRendered = await getImageUsingDataUrl(dataUrl!);
|
|
|
tempSliceImagesWithTrackList.push({
|
|
|
- url: dataUrl,
|
|
|
+ url: dataUrl!,
|
|
|
indexInSliceUrls: store.currentTask.sliceUrls.indexOf(url) + 1,
|
|
|
trackList: thisImageTrackList.filter(
|
|
|
(t) =>
|