kfb-view 2.2.8 → 2.3.0
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 +100 -85
- package/example/index.js +18 -9
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/area/index.js +116 -3
- package/src/components/board/index.js +4 -1
- package/src/components/common/common.js +4 -3
- package/src/tool/Brush.js +3 -0
- package/src/view.js +10 -0
package/.idea/workspace.xml
CHANGED
|
@@ -37,11 +37,8 @@
|
|
|
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$/
|
|
41
|
-
<change beforePath="$PROJECT_DIR$/
|
|
42
|
-
<change beforePath="$PROJECT_DIR$/src/components/board/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/board/index.js" afterDir="false" />
|
|
43
|
-
<change beforePath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.js" afterDir="false" />
|
|
44
|
-
<change beforePath="$PROJECT_DIR$/src/tool/Brush.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Brush.js" afterDir="false" />
|
|
40
|
+
<change beforePath="$PROJECT_DIR$/src/components/area/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/area/index.js" afterDir="false" />
|
|
41
|
+
<change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
|
|
45
42
|
</list>
|
|
46
43
|
<option name="SHOW_DIALOG" value="false" />
|
|
47
44
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -77,21 +74,22 @@
|
|
|
77
74
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
78
75
|
<option name="showLibraryContents" value="true" />
|
|
79
76
|
</component>
|
|
80
|
-
<component name="PropertiesComponent"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
77
|
+
<component name="PropertiesComponent">{
|
|
78
|
+
"keyToString": {
|
|
79
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
80
|
+
"Project.color": "4c401d",
|
|
81
|
+
"WebServerToolWindowFactoryState": "false",
|
|
82
|
+
"dart.analysis.tool.window.visible": "false",
|
|
83
|
+
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
|
|
84
|
+
"node.js.detected.package.eslint": "true",
|
|
85
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
86
|
+
"nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
|
|
87
|
+
"nodejs_package_manager_path": "npm",
|
|
88
|
+
"settings.editor.selected.configurable": "settings.nodejs",
|
|
89
|
+
"ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
|
|
90
|
+
"vue.rearranger.settings.migration": "true"
|
|
93
91
|
}
|
|
94
|
-
}
|
|
92
|
+
}</component>
|
|
95
93
|
<component name="RecentsManager">
|
|
96
94
|
<key name="CopyFile.RECENT_KEYS">
|
|
97
95
|
<recent name="$PROJECT_DIR$/example" />
|
|
@@ -323,63 +321,24 @@
|
|
|
323
321
|
<workItem from="1660291265906" duration="622000" />
|
|
324
322
|
<workItem from="1660354678944" duration="1028000" />
|
|
325
323
|
<workItem from="1660372146258" duration="2000" />
|
|
326
|
-
<workItem from="1660524325887" duration="
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
<
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
<
|
|
333
|
-
<
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
<
|
|
337
|
-
<
|
|
338
|
-
<
|
|
339
|
-
<
|
|
340
|
-
<
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
<
|
|
344
|
-
<option name="number" value="00047" />
|
|
345
|
-
<option name="presentableId" value="LOCAL-00047" />
|
|
346
|
-
<option name="project" value="LOCAL" />
|
|
347
|
-
<updated>1646292978431</updated>
|
|
348
|
-
</task>
|
|
349
|
-
<task id="LOCAL-00048" summary="TerserPlugin">
|
|
350
|
-
<created>1646293408931</created>
|
|
351
|
-
<option name="number" value="00048" />
|
|
352
|
-
<option name="presentableId" value="LOCAL-00048" />
|
|
353
|
-
<option name="project" value="LOCAL" />
|
|
354
|
-
<updated>1646293408931</updated>
|
|
355
|
-
</task>
|
|
356
|
-
<task id="LOCAL-00049" summary="2.1.9">
|
|
357
|
-
<created>1646293508969</created>
|
|
358
|
-
<option name="number" value="00049" />
|
|
359
|
-
<option name="presentableId" value="LOCAL-00049" />
|
|
360
|
-
<option name="project" value="LOCAL" />
|
|
361
|
-
<updated>1646293508969</updated>
|
|
362
|
-
</task>
|
|
363
|
-
<task id="LOCAL-00050" summary="增加图像处理操作">
|
|
364
|
-
<created>1647827904359</created>
|
|
365
|
-
<option name="number" value="00050" />
|
|
366
|
-
<option name="presentableId" value="LOCAL-00050" />
|
|
367
|
-
<option name="project" value="LOCAL" />
|
|
368
|
-
<updated>1647827904359</updated>
|
|
369
|
-
</task>
|
|
370
|
-
<task id="LOCAL-00051" summary="2.1.10">
|
|
371
|
-
<created>1648457445389</created>
|
|
372
|
-
<option name="number" value="00051" />
|
|
373
|
-
<option name="presentableId" value="LOCAL-00051" />
|
|
374
|
-
<option name="project" value="LOCAL" />
|
|
375
|
-
<updated>1648457445389</updated>
|
|
376
|
-
</task>
|
|
377
|
-
<task id="LOCAL-00052" summary="2.1.11 截图优化">
|
|
378
|
-
<created>1649917728743</created>
|
|
379
|
-
<option name="number" value="00052" />
|
|
380
|
-
<option name="presentableId" value="LOCAL-00052" />
|
|
381
|
-
<option name="project" value="LOCAL" />
|
|
382
|
-
<updated>1649917728743</updated>
|
|
324
|
+
<workItem from="1660524325887" duration="6231000" />
|
|
325
|
+
<workItem from="1660544268877" duration="1196000" />
|
|
326
|
+
<workItem from="1660559304089" duration="596000" />
|
|
327
|
+
<workItem from="1660609864291" duration="1272000" />
|
|
328
|
+
<workItem from="1660618324918" duration="598000" />
|
|
329
|
+
<workItem from="1660644014789" duration="599000" />
|
|
330
|
+
<workItem from="1660695374925" duration="593000" />
|
|
331
|
+
<workItem from="1660702683815" duration="681000" />
|
|
332
|
+
<workItem from="1660887408534" duration="1827000" />
|
|
333
|
+
<workItem from="1660892708510" duration="599000" />
|
|
334
|
+
<workItem from="1661049918925" duration="597000" />
|
|
335
|
+
<workItem from="1661073417704" duration="594000" />
|
|
336
|
+
<workItem from="1661133652371" duration="599000" />
|
|
337
|
+
<workItem from="1661147230248" duration="648000" />
|
|
338
|
+
<workItem from="1661304066625" duration="1482000" />
|
|
339
|
+
<workItem from="1661307403631" duration="1194000" />
|
|
340
|
+
<workItem from="1663305397647" duration="8243000" />
|
|
341
|
+
<workItem from="1663546294976" duration="3345000" />
|
|
383
342
|
</task>
|
|
384
343
|
<task id="LOCAL-00053" summary="2.1.12 导出OpenSeadragon">
|
|
385
344
|
<created>1649924762254</created>
|
|
@@ -668,7 +627,63 @@
|
|
|
668
627
|
<option name="project" value="LOCAL" />
|
|
669
628
|
<updated>1659956059809</updated>
|
|
670
629
|
</task>
|
|
671
|
-
<
|
|
630
|
+
<task id="LOCAL-00094" summary="2.2.8">
|
|
631
|
+
<created>1660529152942</created>
|
|
632
|
+
<option name="number" value="00094" />
|
|
633
|
+
<option name="presentableId" value="LOCAL-00094" />
|
|
634
|
+
<option name="project" value="LOCAL" />
|
|
635
|
+
<updated>1660529152943</updated>
|
|
636
|
+
</task>
|
|
637
|
+
<task id="LOCAL-00095" summary="优化标注信息显示">
|
|
638
|
+
<created>1663307741209</created>
|
|
639
|
+
<option name="number" value="00095" />
|
|
640
|
+
<option name="presentableId" value="LOCAL-00095" />
|
|
641
|
+
<option name="project" value="LOCAL" />
|
|
642
|
+
<updated>1663307741209</updated>
|
|
643
|
+
</task>
|
|
644
|
+
<task id="LOCAL-00096" summary="标注事件回调">
|
|
645
|
+
<created>1663310530025</created>
|
|
646
|
+
<option name="number" value="00096" />
|
|
647
|
+
<option name="presentableId" value="LOCAL-00096" />
|
|
648
|
+
<option name="project" value="LOCAL" />
|
|
649
|
+
<updated>1663310530025</updated>
|
|
650
|
+
</task>
|
|
651
|
+
<task id="LOCAL-00097" summary="2.2.9">
|
|
652
|
+
<created>1663310718298</created>
|
|
653
|
+
<option name="number" value="00097" />
|
|
654
|
+
<option name="presentableId" value="LOCAL-00097" />
|
|
655
|
+
<option name="project" value="LOCAL" />
|
|
656
|
+
<updated>1663310718298</updated>
|
|
657
|
+
</task>
|
|
658
|
+
<task id="LOCAL-00098" summary="defaultShow">
|
|
659
|
+
<created>1663310824880</created>
|
|
660
|
+
<option name="number" value="00098" />
|
|
661
|
+
<option name="presentableId" value="LOCAL-00098" />
|
|
662
|
+
<option name="project" value="LOCAL" />
|
|
663
|
+
<updated>1663310824880</updated>
|
|
664
|
+
</task>
|
|
665
|
+
<task id="LOCAL-00099" summary="2.2.9">
|
|
666
|
+
<created>1663310831082</created>
|
|
667
|
+
<option name="number" value="00099" />
|
|
668
|
+
<option name="presentableId" value="LOCAL-00099" />
|
|
669
|
+
<option name="project" value="LOCAL" />
|
|
670
|
+
<updated>1663310831082</updated>
|
|
671
|
+
</task>
|
|
672
|
+
<task id="LOCAL-00100" summary="矩形框的选中点变成线">
|
|
673
|
+
<created>1663552353207</created>
|
|
674
|
+
<option name="number" value="00100" />
|
|
675
|
+
<option name="presentableId" value="LOCAL-00100" />
|
|
676
|
+
<option name="project" value="LOCAL" />
|
|
677
|
+
<updated>1663552353207</updated>
|
|
678
|
+
</task>
|
|
679
|
+
<task id="LOCAL-00101" summary="2.3.0">
|
|
680
|
+
<created>1663552368658</created>
|
|
681
|
+
<option name="number" value="00101" />
|
|
682
|
+
<option name="presentableId" value="LOCAL-00101" />
|
|
683
|
+
<option name="project" value="LOCAL" />
|
|
684
|
+
<updated>1663552368658</updated>
|
|
685
|
+
</task>
|
|
686
|
+
<option name="localTasksCounter" value="102" />
|
|
672
687
|
<servers />
|
|
673
688
|
</component>
|
|
674
689
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -710,13 +725,6 @@
|
|
|
710
725
|
<component name="VcsManagerConfiguration">
|
|
711
726
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
712
727
|
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
|
|
713
|
-
<MESSAGE value="曲线双击结束绘制" />
|
|
714
|
-
<MESSAGE value="标注时增加右键拖动视野" />
|
|
715
|
-
<MESSAGE value="曲线绘制中,按删除键,删除上一个标注点" />
|
|
716
|
-
<MESSAGE value="优化点击操作" />
|
|
717
|
-
<MESSAGE value="enableDbClickClose" />
|
|
718
|
-
<MESSAGE value="2.1.20" />
|
|
719
|
-
<MESSAGE value="view.js" />
|
|
720
728
|
<MESSAGE value="优化选中点" />
|
|
721
729
|
<MESSAGE value="优化标注图形显示,一次最多绘制5000个点,超过的标注延迟加载" />
|
|
722
730
|
<MESSAGE value="键盘事件更新,delete可删除曲线标注点,双击可添加曲线标注点" />
|
|
@@ -735,7 +743,14 @@
|
|
|
735
743
|
<MESSAGE value="触发限制优化" />
|
|
736
744
|
<MESSAGE value="增加图片绘制" />
|
|
737
745
|
<MESSAGE value="2.2.5" />
|
|
738
|
-
<
|
|
746
|
+
<MESSAGE value="2.2.8" />
|
|
747
|
+
<MESSAGE value="优化标注信息显示" />
|
|
748
|
+
<MESSAGE value="标注事件回调" />
|
|
749
|
+
<MESSAGE value="defaultShow" />
|
|
750
|
+
<MESSAGE value="2.2.9" />
|
|
751
|
+
<MESSAGE value="矩形框的选中点变成线" />
|
|
752
|
+
<MESSAGE value="2.3.0" />
|
|
753
|
+
<option name="LAST_COMMIT_MESSAGE" value="2.3.0" />
|
|
739
754
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
|
740
755
|
</component>
|
|
741
756
|
<component name="XSLT-Support.FileAssociations.UIState">
|
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/09/07/fb6f566d15cc52331e3c4f3e1794a748/T2020-00935.kfb';
|
|
6
6
|
|
|
7
7
|
const instance = axios.create({
|
|
8
8
|
baseURL: '/api',
|
|
@@ -55,8 +55,8 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
55
55
|
imageCapRes: data.imageCapRes,
|
|
56
56
|
},
|
|
57
57
|
grid: {
|
|
58
|
-
show:
|
|
59
|
-
ruler:
|
|
58
|
+
show: false,
|
|
59
|
+
ruler: false,
|
|
60
60
|
},
|
|
61
61
|
openSeadragonOptions: {
|
|
62
62
|
maxZoomLevel: data.scanScale * 10,
|
|
@@ -187,9 +187,22 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
187
187
|
);
|
|
188
188
|
},
|
|
189
189
|
measure: {
|
|
190
|
-
|
|
190
|
+
selectHandler(content, label) {
|
|
191
191
|
return [...content];
|
|
192
192
|
},
|
|
193
|
+
handler(content, label) {
|
|
194
|
+
return ['标注类别:ASC-HS'];
|
|
195
|
+
},
|
|
196
|
+
show: true,
|
|
197
|
+
},
|
|
198
|
+
labelDrawing(canvas, label, region) {
|
|
199
|
+
/* console.log(label, region);
|
|
200
|
+
const ctx = canvas.getContext('2d');
|
|
201
|
+
ctx.beginPath();
|
|
202
|
+
ctx.lineWidth = 2;
|
|
203
|
+
ctx.moveTo(region.x, region.y);
|
|
204
|
+
ctx.lineTo(region.x-10, region.y);
|
|
205
|
+
ctx.stroke();*/
|
|
193
206
|
},
|
|
194
207
|
labelList: [
|
|
195
208
|
{
|
|
@@ -204,7 +217,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
204
217
|
kv.viewer.addHandler('zoom', (res) => {
|
|
205
218
|
const zoom = kv.viewer.viewport.viewportToImageZoom(res.zoom) *
|
|
206
219
|
kv.$options.scale;
|
|
207
|
-
|
|
220
|
+
console.log(zoom.toFixed(2) / 1);
|
|
208
221
|
});
|
|
209
222
|
console.log(kv);
|
|
210
223
|
let list = [];
|
|
@@ -234,13 +247,9 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
234
247
|
rect.onclick = () => {
|
|
235
248
|
kv.board.startDraw({
|
|
236
249
|
tool: KfbView.marks.RECTANGLE,
|
|
237
|
-
lineWidth: 10,
|
|
238
250
|
isROI: false,
|
|
239
251
|
once: true,
|
|
240
252
|
measure: true,
|
|
241
|
-
resize: false,
|
|
242
|
-
move: false,
|
|
243
|
-
fillStyle: '#ff00ff8d',
|
|
244
253
|
});
|
|
245
254
|
};
|
|
246
255
|
line.onclick = () => {
|