kfb-view 3.0.4 → 3.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kfb-view",
3
3
  "description": "一个在线kfb的阅片软件",
4
- "version": "3.0.4",
4
+ "version": "3.0.5",
5
5
  "author": "qifeng.fan <qifeng.fan@hzztai.com>",
6
6
  "license": "MIT",
7
7
  "main": "lib/kfb-view.js",
@@ -56,7 +56,15 @@ export class Tailoring extends ViewerCommon {
56
56
  pointList[6],
57
57
  pointList[8]];
58
58
  if (now) {
59
- this.$emit(EVENT_TAILORING_SCREENSHOT, this.getScreenCanvasImage());
59
+ this.emitTailoringRegion();
60
+ this.$emit(EVENT_TAILORING_SCREENSHOT, {
61
+ base64: this.getScreenCanvasImage(),
62
+ region: this.viewerElementToImageRectangle({
63
+ x: this.tailoringPoints[0].x, y: this.tailoringPoints[0].y,
64
+ width: this.tailoringPoints[3].x - this.tailoringPoints[0].x,
65
+ height: this.tailoringPoints[3].y - this.tailoringPoints[0].y,
66
+ }),
67
+ });
60
68
  this.stopTailoring();
61
69
  } else {
62
70
  this.color = color || '#FFF';
@@ -253,7 +261,15 @@ export class Tailoring extends ViewerCommon {
253
261
 
254
262
  onCanvasDblClick(position) {
255
263
  if (this.tailoringPoints.length > 0 && this.isPointInMatrix(position)) {
256
- this.$emit(EVENT_TAILORING_SCREENSHOT, this.getScreenCanvasImage());
264
+ this.emitTailoringRegion();
265
+ this.$emit(EVENT_TAILORING_SCREENSHOT, {
266
+ base64: this.getScreenCanvasImage(),
267
+ region: this.viewerElementToImageRectangle({
268
+ x: this.tailoringPoints[0].x, y: this.tailoringPoints[0].y,
269
+ width: this.tailoringPoints[3].x - this.tailoringPoints[0].x,
270
+ height: this.tailoringPoints[3].y - this.tailoringPoints[0].y,
271
+ }),
272
+ });
257
273
  }
258
274
  this.stopTailoring();
259
275
  }