kfb-view 3.3.3 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/kfb-view.cjs.js +1 -1
- package/lib/kfb-view.es.js +1 -13184
- package/lib/kfb-view.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/tailoring/index.js +5 -2
package/package.json
CHANGED
|
@@ -37,6 +37,7 @@ export class Tailoring extends ViewerCommon {
|
|
|
37
37
|
shape: true,
|
|
38
38
|
...this.options,
|
|
39
39
|
};
|
|
40
|
+
this.custom = undefined;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
init({
|
|
@@ -47,7 +48,7 @@ export class Tailoring extends ViewerCommon {
|
|
|
47
48
|
color,
|
|
48
49
|
now = false,
|
|
49
50
|
contents = [],
|
|
50
|
-
}) {
|
|
51
|
+
}, custom) {
|
|
51
52
|
this.isInTailoring = true;
|
|
52
53
|
this.movePointIndex = -1;
|
|
53
54
|
const pointList = getRectPoint({x: left, y: top},
|
|
@@ -57,6 +58,7 @@ export class Tailoring extends ViewerCommon {
|
|
|
57
58
|
pointList[2],
|
|
58
59
|
pointList[6],
|
|
59
60
|
pointList[8]];
|
|
61
|
+
this.custom = custom;
|
|
60
62
|
if (now) {
|
|
61
63
|
this.emitScreenShot();
|
|
62
64
|
this.stopTailoring();
|
|
@@ -322,6 +324,7 @@ export class Tailoring extends ViewerCommon {
|
|
|
322
324
|
width: this.tailoringPoints[3].x - this.tailoringPoints[0].x,
|
|
323
325
|
height: this.tailoringPoints[3].y - this.tailoringPoints[0].y,
|
|
324
326
|
}),
|
|
327
|
+
custom: this.custom,
|
|
325
328
|
});
|
|
326
329
|
}
|
|
327
330
|
|
|
@@ -384,7 +387,7 @@ export class Tailoring extends ViewerCommon {
|
|
|
384
387
|
const shapeCanvas = this.kv.shape?.canvas;
|
|
385
388
|
if (shapeCanvas && this.options.shape) {
|
|
386
389
|
copyCtx.drawImage(shapeCanvas, startPoint.x,
|
|
387
|
-
startPoint.y,
|
|
390
|
+
startPoint.y, Math.abs(endPoint.x - startPoint.x), Math.abs(endPoint.y - startPoint.y), 0, 0, disWidth,
|
|
388
391
|
disHeight);
|
|
389
392
|
}
|
|
390
393
|
if (copyCanvas.width > this.options.resolution) {
|