kfb-view 3.2.1 → 3.2.3
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.js +1 -1
- package/lib/kfb-view.js.LICENSE.txt +3 -3
- package/package.json +1 -1
- package/src/components/area/index.js +20 -25
- package/src/components/graduation/index.js +0 -1
- package/src/plugin/openseadragon/openseadragon.js +3351 -3851
- package/src/util/index.js +3 -0
- package/src/view.js +10 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//! Built on
|
|
1
|
+
//! Built on 2024-04-01
|
|
2
2
|
|
|
3
|
-
//! Git commit: v4.1.
|
|
3
|
+
//! Git commit: v4.1.1-1-f90d9814
|
|
4
4
|
|
|
5
5
|
//! License: http://openseadragon.github.io/license/
|
|
6
6
|
|
|
7
7
|
//! http://openseadragon.github.io
|
|
8
8
|
|
|
9
|
-
//! openseadragon 4.1.
|
|
9
|
+
//! openseadragon 4.1.1
|
package/package.json
CHANGED
|
@@ -679,33 +679,28 @@ export class Area extends ViewerCommon {
|
|
|
679
679
|
showLabelMeasure() {
|
|
680
680
|
const bounds = this.viewport.viewportToImageRectangle(
|
|
681
681
|
this.viewport.getBounds());
|
|
682
|
-
const currentScale = this.getImageZoom(true);
|
|
683
|
-
|
|
684
|
-
const label = this.labelList.find((item) => item.select);
|
|
685
|
-
if (!label) return;
|
|
682
|
+
const currentScale = this.getImageZoom(true) * this.options.scale;
|
|
683
|
+
this.labelList.forEach((label) => {
|
|
686
684
|
if (label.show === false) return;
|
|
685
|
+
if (!this.isInCanvas(label.region, bounds)) return;
|
|
686
|
+
this.labelDrawingFunc(label);
|
|
687
687
|
if (label.measure === false) return;
|
|
688
|
-
|
|
689
|
-
this.
|
|
690
|
-
|
|
691
|
-
this.
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
this.options.labelDrawing;
|
|
705
|
-
drawingFunc(this.canvas, label,
|
|
706
|
-
this.imageToViewerElementRectangle(label.region));
|
|
707
|
-
}
|
|
708
|
-
});
|
|
688
|
+
if (label.select) {
|
|
689
|
+
this[label.tool].drawMeasureInfo.call(this, label,
|
|
690
|
+
this.getMeasureContent(label));
|
|
691
|
+
} else if (currentScale >= this.options.measure.scale && this.options.measure.defaultShow) {
|
|
692
|
+
this[label.tool].drawMeasureInfo.call(this, label,
|
|
693
|
+
this.getMeasureContent(label));
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
labelDrawingFunc(label) {
|
|
699
|
+
if (this.options.labelDrawing || this.options.label?.drawing) {
|
|
700
|
+
const drawingFunc = this.options.label?.drawing ||
|
|
701
|
+
this.options.labelDrawing;
|
|
702
|
+
drawingFunc(this.canvas, label,
|
|
703
|
+
this.imageToViewerElementRectangle(label.region));
|
|
709
704
|
}
|
|
710
705
|
}
|
|
711
706
|
|
|
@@ -46,7 +46,6 @@ export class Graduation extends ViewerCommon {
|
|
|
46
46
|
const startPoint = this.imageToViewerElementCoordinates(0, 0);
|
|
47
47
|
const endPoint = this.imageToViewerElementCoordinates(px, 0);
|
|
48
48
|
const width = Math.abs(endPoint.x - startPoint.x);
|
|
49
|
-
console.log(width, txt);
|
|
50
49
|
if (this.options.custom) {
|
|
51
50
|
this.mitt.$emit(EVENT_GRADUATION_CHANGE, {width, txt});
|
|
52
51
|
} else {
|