kfb-view 2.2.1 → 2.2.4
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/.idea/workspace.xml +112 -93
- package/config/webpack.dev.conf.js +2 -1
- package/example/index.js +30 -8
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/area/index.js +10 -3
- package/src/components/board/index.js +31 -33
- package/src/components/common/common.js +24 -7
- package/src/components/graduation/index.js +14 -22
- package/src/components/grid/index.js +120 -0
- package/src/components/index.js +1 -0
- package/src/components/navigator/index.js +58 -27
- package/src/components/navigator/navigator.scss +0 -3
- package/src/components/shape/index.js +2 -2
- package/src/components/tailoring/index.js +1 -1
- package/src/const/component.js +1 -0
- package/src/tool/Brush.js +13 -8
- package/src/tool/Polygon.js +0 -6
- package/src/view.js +25 -5
package/.idea/workspace.xml
CHANGED
|
@@ -37,7 +37,14 @@
|
|
|
37
37
|
</component>
|
|
38
38
|
<component name="ChangeListManager">
|
|
39
39
|
<list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="">
|
|
40
|
+
<change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
|
|
40
41
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
42
|
+
<change beforePath="$PROJECT_DIR$/src/components/area/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/area/index.js" afterDir="false" />
|
|
43
|
+
<change beforePath="$PROJECT_DIR$/src/components/board/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/board/index.js" afterDir="false" />
|
|
44
|
+
<change beforePath="$PROJECT_DIR$/src/components/navigator/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/navigator/index.js" afterDir="false" />
|
|
45
|
+
<change beforePath="$PROJECT_DIR$/src/tool/Brush.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Brush.js" afterDir="false" />
|
|
46
|
+
<change beforePath="$PROJECT_DIR$/src/tool/Polygon.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Polygon.js" afterDir="false" />
|
|
47
|
+
<change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
|
|
41
48
|
</list>
|
|
42
49
|
<option name="SHOW_DIALOG" value="false" />
|
|
43
50
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -48,8 +55,8 @@
|
|
|
48
55
|
<option name="RECENT_TEMPLATES">
|
|
49
56
|
<list>
|
|
50
57
|
<option value="CSS File" />
|
|
51
|
-
<option value="JavaScript File" />
|
|
52
58
|
<option value="HTML File" />
|
|
59
|
+
<option value="JavaScript File" />
|
|
53
60
|
</list>
|
|
54
61
|
</option>
|
|
55
62
|
</component>
|
|
@@ -73,21 +80,21 @@
|
|
|
73
80
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
74
81
|
<option name="showLibraryContents" value="true" />
|
|
75
82
|
</component>
|
|
76
|
-
<component name="PropertiesComponent"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
<component name="PropertiesComponent">{
|
|
84
|
+
"keyToString": {
|
|
85
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
86
|
+
"WebServerToolWindowFactoryState": "false",
|
|
87
|
+
"dart.analysis.tool.window.visible": "false",
|
|
88
|
+
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
|
|
89
|
+
"node.js.detected.package.eslint": "true",
|
|
90
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
91
|
+
"nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
|
|
92
|
+
"nodejs_package_manager_path": "npm",
|
|
93
|
+
"settings.editor.selected.configurable": "settings.nodejs",
|
|
94
|
+
"ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
|
|
95
|
+
"vue.rearranger.settings.migration": "true"
|
|
89
96
|
}
|
|
90
|
-
}
|
|
97
|
+
}</component>
|
|
91
98
|
<component name="RecentsManager">
|
|
92
99
|
<key name="CopyFile.RECENT_KEYS">
|
|
93
100
|
<recent name="$PROJECT_DIR$/src/image" />
|
|
@@ -97,14 +104,14 @@
|
|
|
97
104
|
<recent name="$PROJECT_DIR$/src/components/rotation" />
|
|
98
105
|
</key>
|
|
99
106
|
<key name="MoveFile.RECENT_KEYS">
|
|
107
|
+
<recent name="$PROJECT_DIR$/src/components/grid" />
|
|
100
108
|
<recent name="$PROJECT_DIR$" />
|
|
101
109
|
<recent name="$PROJECT_DIR$/src" />
|
|
102
110
|
<recent name="$PROJECT_DIR$/example" />
|
|
103
111
|
<recent name="$PROJECT_DIR$/src/tool" />
|
|
104
|
-
<recent name="$PROJECT_DIR$/src/components" />
|
|
105
112
|
</key>
|
|
106
113
|
</component>
|
|
107
|
-
<component name="RunManager" selected="npm.
|
|
114
|
+
<component name="RunManager" selected="npm.server:hot">
|
|
108
115
|
<configuration name="build:lib" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
|
109
116
|
<package-json value="$PROJECT_DIR$/package.json" />
|
|
110
117
|
<command value="run" />
|
|
@@ -167,8 +174,8 @@
|
|
|
167
174
|
</list>
|
|
168
175
|
<recent_temporary>
|
|
169
176
|
<list>
|
|
170
|
-
<item itemvalue="npm.build:lib" />
|
|
171
177
|
<item itemvalue="npm.server:hot" />
|
|
178
|
+
<item itemvalue="npm.build:lib" />
|
|
172
179
|
<item itemvalue="npm.clean:lib" />
|
|
173
180
|
<item itemvalue="npm.server" />
|
|
174
181
|
<item itemvalue="npm.build:prod" />
|
|
@@ -293,70 +300,19 @@
|
|
|
293
300
|
<workItem from="1657366256057" duration="578000" />
|
|
294
301
|
<workItem from="1657519907711" duration="2848000" />
|
|
295
302
|
<workItem from="1657527397247" duration="15173000" />
|
|
296
|
-
<workItem from="1657587519037" duration="
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
<
|
|
300
|
-
<
|
|
301
|
-
<
|
|
302
|
-
<
|
|
303
|
-
<
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
<
|
|
307
|
-
<
|
|
308
|
-
<
|
|
309
|
-
<option name="project" value="LOCAL" />
|
|
310
|
-
<updated>1631757323462</updated>
|
|
311
|
-
</task>
|
|
312
|
-
<task id="LOCAL-00035" summary="2.1.1">
|
|
313
|
-
<created>1631758578474</created>
|
|
314
|
-
<option name="number" value="00035" />
|
|
315
|
-
<option name="presentableId" value="LOCAL-00035" />
|
|
316
|
-
<option name="project" value="LOCAL" />
|
|
317
|
-
<updated>1631758578474</updated>
|
|
318
|
-
</task>
|
|
319
|
-
<task id="LOCAL-00036" summary="eslint">
|
|
320
|
-
<created>1631760254126</created>
|
|
321
|
-
<option name="number" value="00036" />
|
|
322
|
-
<option name="presentableId" value="LOCAL-00036" />
|
|
323
|
-
<option name="project" value="LOCAL" />
|
|
324
|
-
<updated>1631760254126</updated>
|
|
325
|
-
</task>
|
|
326
|
-
<task id="LOCAL-00037" summary="Curve is obsolete. Please use polygon instead">
|
|
327
|
-
<created>1631760521355</created>
|
|
328
|
-
<option name="number" value="00037" />
|
|
329
|
-
<option name="presentableId" value="LOCAL-00037" />
|
|
330
|
-
<option name="project" value="LOCAL" />
|
|
331
|
-
<updated>1631760521355</updated>
|
|
332
|
-
</task>
|
|
333
|
-
<task id="LOCAL-00038" summary="优化调整">
|
|
334
|
-
<created>1632362091089</created>
|
|
335
|
-
<option name="number" value="00038" />
|
|
336
|
-
<option name="presentableId" value="LOCAL-00038" />
|
|
337
|
-
<option name="project" value="LOCAL" />
|
|
338
|
-
<updated>1632362091089</updated>
|
|
339
|
-
</task>
|
|
340
|
-
<task id="LOCAL-00039" summary="2.1.2">
|
|
341
|
-
<created>1632362102053</created>
|
|
342
|
-
<option name="number" value="00039" />
|
|
343
|
-
<option name="presentableId" value="LOCAL-00039" />
|
|
344
|
-
<option name="project" value="LOCAL" />
|
|
345
|
-
<updated>1632362102053</updated>
|
|
346
|
-
</task>
|
|
347
|
-
<task id="LOCAL-00040" summary="修复navigator中图片宽高一致时不显示">
|
|
348
|
-
<created>1632364163945</created>
|
|
349
|
-
<option name="number" value="00040" />
|
|
350
|
-
<option name="presentableId" value="LOCAL-00040" />
|
|
351
|
-
<option name="project" value="LOCAL" />
|
|
352
|
-
<updated>1632364163945</updated>
|
|
353
|
-
</task>
|
|
354
|
-
<task id="LOCAL-00041" summary="2.1.3">
|
|
355
|
-
<created>1632364173513</created>
|
|
356
|
-
<option name="number" value="00041" />
|
|
357
|
-
<option name="presentableId" value="LOCAL-00041" />
|
|
358
|
-
<option name="project" value="LOCAL" />
|
|
359
|
-
<updated>1632364173513</updated>
|
|
303
|
+
<workItem from="1657587519037" duration="20593000" />
|
|
304
|
+
<workItem from="1657785384118" duration="336000" />
|
|
305
|
+
<workItem from="1658133724686" duration="5036000" />
|
|
306
|
+
<workItem from="1658365477621" duration="2695000" />
|
|
307
|
+
<workItem from="1658371298489" duration="3932000" />
|
|
308
|
+
<workItem from="1658393509298" duration="2844000" />
|
|
309
|
+
<workItem from="1658398367362" duration="1815000" />
|
|
310
|
+
<workItem from="1658401123366" duration="603000" />
|
|
311
|
+
<workItem from="1658513789094" duration="298000" />
|
|
312
|
+
<workItem from="1658666796644" duration="14873000" />
|
|
313
|
+
<workItem from="1658714844889" duration="5805000" />
|
|
314
|
+
<workItem from="1658796588637" duration="759000" />
|
|
315
|
+
<workItem from="1659404898003" duration="4027000" />
|
|
360
316
|
</task>
|
|
361
317
|
<task id="LOCAL-00042" summary="2.1.4">
|
|
362
318
|
<created>1632364377230</created>
|
|
@@ -638,7 +594,70 @@
|
|
|
638
594
|
<option name="project" value="LOCAL" />
|
|
639
595
|
<updated>1657612318447</updated>
|
|
640
596
|
</task>
|
|
641
|
-
<
|
|
597
|
+
<task id="LOCAL-00082" summary="2.2.1">
|
|
598
|
+
<created>1657612343466</created>
|
|
599
|
+
<option name="number" value="00082" />
|
|
600
|
+
<option name="presentableId" value="LOCAL-00082" />
|
|
601
|
+
<option name="project" value="LOCAL" />
|
|
602
|
+
<updated>1657612343466</updated>
|
|
603
|
+
</task>
|
|
604
|
+
<task id="LOCAL-00083" summary="index.js">
|
|
605
|
+
<created>1657785699795</created>
|
|
606
|
+
<option name="number" value="00083" />
|
|
607
|
+
<option name="presentableId" value="LOCAL-00083" />
|
|
608
|
+
<option name="project" value="LOCAL" />
|
|
609
|
+
<updated>1657785699797</updated>
|
|
610
|
+
</task>
|
|
611
|
+
<task id="LOCAL-00084" summary="导航轨迹显示">
|
|
612
|
+
<created>1658394875542</created>
|
|
613
|
+
<option name="number" value="00084" />
|
|
614
|
+
<option name="presentableId" value="LOCAL-00084" />
|
|
615
|
+
<option name="project" value="LOCAL" />
|
|
616
|
+
<updated>1658394875543</updated>
|
|
617
|
+
</task>
|
|
618
|
+
<task id="LOCAL-00085" summary="刻度线显示">
|
|
619
|
+
<created>1658398987159</created>
|
|
620
|
+
<option name="number" value="00085" />
|
|
621
|
+
<option name="presentableId" value="LOCAL-00085" />
|
|
622
|
+
<option name="project" value="LOCAL" />
|
|
623
|
+
<updated>1658398987163</updated>
|
|
624
|
+
</task>
|
|
625
|
+
<task id="LOCAL-00086" summary="2.2.2">
|
|
626
|
+
<created>1658399404095</created>
|
|
627
|
+
<option name="number" value="00086" />
|
|
628
|
+
<option name="presentableId" value="LOCAL-00086" />
|
|
629
|
+
<option name="project" value="LOCAL" />
|
|
630
|
+
<updated>1658399404095</updated>
|
|
631
|
+
</task>
|
|
632
|
+
<task id="LOCAL-00087" summary="增加网格线和标尺">
|
|
633
|
+
<created>1658710072174</created>
|
|
634
|
+
<option name="number" value="00087" />
|
|
635
|
+
<option name="presentableId" value="LOCAL-00087" />
|
|
636
|
+
<option name="project" value="LOCAL" />
|
|
637
|
+
<updated>1658710072175</updated>
|
|
638
|
+
</task>
|
|
639
|
+
<task id="LOCAL-00088" summary="标注信息优化显示">
|
|
640
|
+
<created>1658713081785</created>
|
|
641
|
+
<option name="number" value="00088" />
|
|
642
|
+
<option name="presentableId" value="LOCAL-00088" />
|
|
643
|
+
<option name="project" value="LOCAL" />
|
|
644
|
+
<updated>1658713081785</updated>
|
|
645
|
+
</task>
|
|
646
|
+
<task id="LOCAL-00089" summary="2.2.3">
|
|
647
|
+
<created>1658713100852</created>
|
|
648
|
+
<option name="number" value="00089" />
|
|
649
|
+
<option name="presentableId" value="LOCAL-00089" />
|
|
650
|
+
<option name="project" value="LOCAL" />
|
|
651
|
+
<updated>1658713100852</updated>
|
|
652
|
+
</task>
|
|
653
|
+
<task id="LOCAL-00090" summary="grid优化">
|
|
654
|
+
<created>1658715904288</created>
|
|
655
|
+
<option name="number" value="00090" />
|
|
656
|
+
<option name="presentableId" value="LOCAL-00090" />
|
|
657
|
+
<option name="project" value="LOCAL" />
|
|
658
|
+
<updated>1658715904291</updated>
|
|
659
|
+
</task>
|
|
660
|
+
<option name="localTasksCounter" value="91" />
|
|
642
661
|
<servers />
|
|
643
662
|
</component>
|
|
644
663
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -680,15 +699,6 @@
|
|
|
680
699
|
<component name="VcsManagerConfiguration">
|
|
681
700
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
682
701
|
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
|
|
683
|
-
<MESSAGE value="组合框异常" />
|
|
684
|
-
<MESSAGE value="2.1.14" />
|
|
685
|
-
<MESSAGE value="闭合区域" />
|
|
686
|
-
<MESSAGE value="2.1.15" />
|
|
687
|
-
<MESSAGE value="闭合曲线" />
|
|
688
|
-
<MESSAGE value="2.1.16" />
|
|
689
|
-
<MESSAGE value="优化加载速度" />
|
|
690
|
-
<MESSAGE value="2.1.17" />
|
|
691
|
-
<MESSAGE value="2.1.18" />
|
|
692
702
|
<MESSAGE value="增加曲线开始点显示" />
|
|
693
703
|
<MESSAGE value="2.1.19" />
|
|
694
704
|
<MESSAGE value="绘制起点提示" />
|
|
@@ -705,7 +715,16 @@
|
|
|
705
715
|
<MESSAGE value="2.20.0" />
|
|
706
716
|
<MESSAGE value="2.2.0" />
|
|
707
717
|
<MESSAGE value="加载速度优化" />
|
|
708
|
-
<
|
|
718
|
+
<MESSAGE value="2.2.1" />
|
|
719
|
+
<MESSAGE value="index.js" />
|
|
720
|
+
<MESSAGE value="导航轨迹显示" />
|
|
721
|
+
<MESSAGE value="刻度线显示" />
|
|
722
|
+
<MESSAGE value="2.2.2" />
|
|
723
|
+
<MESSAGE value="增加网格线和标尺" />
|
|
724
|
+
<MESSAGE value="标注信息优化显示" />
|
|
725
|
+
<MESSAGE value="2.2.3" />
|
|
726
|
+
<MESSAGE value="grid优化" />
|
|
727
|
+
<option name="LAST_COMMIT_MESSAGE" value="grid优化" />
|
|
709
728
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
|
710
729
|
</component>
|
|
711
730
|
<component name="XSLT-Support.FileAssociations.UIState">
|
|
@@ -65,9 +65,10 @@ module.exports = function() {
|
|
|
65
65
|
context: ['/api', '/image.php', '/process.php'],
|
|
66
66
|
// target: 'http://gastric.label.hzztai.com/',
|
|
67
67
|
// target: 'http://192.168.1.91:7007',
|
|
68
|
-
target: 'http://192.168.1.91',
|
|
68
|
+
// target: 'http://192.168.1.91',
|
|
69
69
|
// target: 'https://tct.hzztai.com',
|
|
70
70
|
// target: 'https://pis-ningbo.hzztai.com',
|
|
71
|
+
target: 'https://pis-test.hzztai.com',
|
|
71
72
|
secure: false,
|
|
72
73
|
changeOrigin: true,
|
|
73
74
|
},
|
package/example/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {KfbView, hslToRgb, rgbToHsl, cacheGammaTable} from '../src';
|
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import {EVENT_DB_CLICK_LABEL} from '../src/const/event';
|
|
4
4
|
|
|
5
|
-
const fileName = '/upload/large_file/last/2022/
|
|
5
|
+
const fileName = '/upload/large_file/last/2022/06/22/3625ce6de8197c7315ce9e05b4ef233b/IHC.kfb';
|
|
6
6
|
|
|
7
7
|
const instance = axios.create({
|
|
8
8
|
baseURL: '/api',
|
|
@@ -40,15 +40,23 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
40
40
|
ROI: false,
|
|
41
41
|
},
|
|
42
42
|
graduation: {
|
|
43
|
-
|
|
43
|
+
show: true,
|
|
44
|
+
left: 30,
|
|
45
|
+
bottom: 10,
|
|
44
46
|
},
|
|
45
47
|
navigator: {
|
|
46
48
|
disabled: false,
|
|
47
|
-
height: 200,
|
|
48
49
|
style: 'right: 0;top: 0',
|
|
49
50
|
thumbnail: `/api/slide/getImage?file=${fileName}&type=thumbnail`,
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
scale: data.scanScale,
|
|
52
|
+
},
|
|
53
|
+
pxConversion: {
|
|
54
|
+
unit: 'um',
|
|
55
|
+
imageCapRes: data.imageCapRes,
|
|
56
|
+
},
|
|
57
|
+
grid: {
|
|
58
|
+
show: true,
|
|
59
|
+
ruler: true,
|
|
52
60
|
},
|
|
53
61
|
openSeadragonOptions: {
|
|
54
62
|
maxZoomLevel: data.scanScale * 10,
|
|
@@ -135,7 +143,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
135
143
|
}
|
|
136
144
|
if (rangeB !== 0) {
|
|
137
145
|
b = b * (1 + rangeB);
|
|
138
|
-
|
|
146
|
+
b = b > 255 ? 255 : b;
|
|
139
147
|
}
|
|
140
148
|
if (rangeS !== 0) {
|
|
141
149
|
let {h, s, l} = rgbToHsl(r, g, b);
|
|
@@ -178,10 +186,20 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
178
186
|
size.y,
|
|
179
187
|
);
|
|
180
188
|
},
|
|
189
|
+
measure: {
|
|
190
|
+
handler(content, label) {
|
|
191
|
+
return [...content];
|
|
192
|
+
},
|
|
193
|
+
},
|
|
181
194
|
});
|
|
182
195
|
/* kv.board.startDraw({
|
|
183
196
|
tool: KfbView.marks.POLYGON,
|
|
184
197
|
});*/
|
|
198
|
+
kv.viewer.addHandler('zoom', (res) => {
|
|
199
|
+
const zoom = kv.viewer.viewport.viewportToImageZoom(res.zoom) *
|
|
200
|
+
kv.$options.scale;
|
|
201
|
+
console.log(zoom.toFixed(2) / 1);
|
|
202
|
+
});
|
|
185
203
|
console.log(kv);
|
|
186
204
|
let list = [];
|
|
187
205
|
document.querySelector('#a').onchange = debounce(changeRange, 500);
|
|
@@ -213,7 +231,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
213
231
|
lineWidth: 10,
|
|
214
232
|
isROI: false,
|
|
215
233
|
once: true,
|
|
216
|
-
measure:
|
|
234
|
+
measure: true,
|
|
217
235
|
resize: false,
|
|
218
236
|
move: false,
|
|
219
237
|
fillStyle: '#ff00ff8d',
|
|
@@ -319,8 +337,12 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
319
337
|
});*/
|
|
320
338
|
setTimeout(() => {
|
|
321
339
|
// kv.destroy();
|
|
340
|
+
setTimeout(() => {
|
|
341
|
+
// kv.destroy();
|
|
342
|
+
}, 6000);
|
|
322
343
|
}, 6000);
|
|
323
|
-
|
|
344
|
+
|
|
345
|
+
// initLabels();
|
|
324
346
|
|
|
325
347
|
function initLabels() {
|
|
326
348
|
const labels = [];
|