|
@@ -312,9 +312,10 @@ async function processSplitConfig() {
|
|
|
const indexInSliceUrls = store.currentTask.sliceUrls.indexOf(url) + 1;
|
|
|
const image = images[indexInSliceUrls - 1];
|
|
|
let shouldBreak = false;
|
|
|
+ let [splitConfigStart, splitConfigEnd] = config;
|
|
|
if (image.naturalHeight > image.naturalWidth) {
|
|
|
- config[0] = 0;
|
|
|
- config[1] = 1;
|
|
|
+ splitConfigStart = 0;
|
|
|
+ splitConfigEnd = 1;
|
|
|
shouldBreak = true;
|
|
|
}
|
|
|
|
|
@@ -322,7 +323,7 @@ async function processSplitConfig() {
|
|
|
|
|
|
const dataUrl = await getDataUrlForSplitConfig(
|
|
|
image,
|
|
|
- config,
|
|
|
+ [splitConfigStart, splitConfigEnd],
|
|
|
maxSliceWidth,
|
|
|
url
|
|
|
);
|
|
@@ -370,10 +371,10 @@ async function processSplitConfig() {
|
|
|
// originalImageHeight: image.naturalHeight,
|
|
|
sliceImageWidth: sliceImageRendered.naturalWidth,
|
|
|
sliceImageHeight: sliceImageRendered.naturalHeight,
|
|
|
- dx: image.naturalWidth * config[0],
|
|
|
+ dx: image.naturalWidth * splitConfigStart,
|
|
|
dy: 0,
|
|
|
accumTopHeight,
|
|
|
- effectiveWidth: image.naturalWidth * config[1],
|
|
|
+ effectiveWidth: image.naturalWidth * splitConfigEnd,
|
|
|
});
|
|
|
accumTopHeight = accumBottomHeight;
|
|
|
|