kfb-view 2.2.8 → 2.2.9
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 +56 -41
- package/example/index.js +18 -5
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/area/index.js +28 -2
- 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 +7 -0
package/.idea/workspace.xml
CHANGED
|
@@ -37,11 +37,9 @@
|
|
|
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" />
|
|
41
40
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
42
|
-
<change beforePath="$PROJECT_DIR$/src/components/
|
|
43
|
-
<change beforePath="$PROJECT_DIR$/src/
|
|
44
|
-
<change beforePath="$PROJECT_DIR$/src/tool/Brush.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Brush.js" afterDir="false" />
|
|
41
|
+
<change beforePath="$PROJECT_DIR$/src/components/area/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/area/index.js" afterDir="false" />
|
|
42
|
+
<change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
|
|
45
43
|
</list>
|
|
46
44
|
<option name="SHOW_DIALOG" value="false" />
|
|
47
45
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -80,6 +78,7 @@
|
|
|
80
78
|
<component name="PropertiesComponent"><![CDATA[{
|
|
81
79
|
"keyToString": {
|
|
82
80
|
"DefaultHtmlFileTemplate": "HTML File",
|
|
81
|
+
"Project.color": "4c401d",
|
|
83
82
|
"WebServerToolWindowFactoryState": "false",
|
|
84
83
|
"dart.analysis.tool.window.visible": "false",
|
|
85
84
|
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
|
|
@@ -108,7 +107,7 @@
|
|
|
108
107
|
<recent name="$PROJECT_DIR$/src/tool" />
|
|
109
108
|
</key>
|
|
110
109
|
</component>
|
|
111
|
-
<component name="RunManager" selected="npm.
|
|
110
|
+
<component name="RunManager" selected="npm.server:hot">
|
|
112
111
|
<configuration name="build:lib" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
|
113
112
|
<package-json value="$PROJECT_DIR$/package.json" />
|
|
114
113
|
<command value="run" />
|
|
@@ -171,8 +170,8 @@
|
|
|
171
170
|
</list>
|
|
172
171
|
<recent_temporary>
|
|
173
172
|
<list>
|
|
174
|
-
<item itemvalue="npm.build:lib" />
|
|
175
173
|
<item itemvalue="npm.server:hot" />
|
|
174
|
+
<item itemvalue="npm.build:lib" />
|
|
176
175
|
<item itemvalue="npm.clean:lib" />
|
|
177
176
|
<item itemvalue="npm.server" />
|
|
178
177
|
<item itemvalue="npm.build:prod" />
|
|
@@ -323,35 +322,23 @@
|
|
|
323
322
|
<workItem from="1660291265906" duration="622000" />
|
|
324
323
|
<workItem from="1660354678944" duration="1028000" />
|
|
325
324
|
<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
|
-
<created>1646292978431</created>
|
|
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>
|
|
325
|
+
<workItem from="1660524325887" duration="6231000" />
|
|
326
|
+
<workItem from="1660544268877" duration="1196000" />
|
|
327
|
+
<workItem from="1660559304089" duration="596000" />
|
|
328
|
+
<workItem from="1660609864291" duration="1272000" />
|
|
329
|
+
<workItem from="1660618324918" duration="598000" />
|
|
330
|
+
<workItem from="1660644014789" duration="599000" />
|
|
331
|
+
<workItem from="1660695374925" duration="593000" />
|
|
332
|
+
<workItem from="1660702683815" duration="681000" />
|
|
333
|
+
<workItem from="1660887408534" duration="1827000" />
|
|
334
|
+
<workItem from="1660892708510" duration="599000" />
|
|
335
|
+
<workItem from="1661049918925" duration="597000" />
|
|
336
|
+
<workItem from="1661073417704" duration="594000" />
|
|
337
|
+
<workItem from="1661133652371" duration="599000" />
|
|
338
|
+
<workItem from="1661147230248" duration="648000" />
|
|
339
|
+
<workItem from="1661304066625" duration="1482000" />
|
|
340
|
+
<workItem from="1661307403631" duration="1194000" />
|
|
341
|
+
<workItem from="1663305397647" duration="5412000" />
|
|
355
342
|
</task>
|
|
356
343
|
<task id="LOCAL-00049" summary="2.1.9">
|
|
357
344
|
<created>1646293508969</created>
|
|
@@ -668,7 +655,35 @@
|
|
|
668
655
|
<option name="project" value="LOCAL" />
|
|
669
656
|
<updated>1659956059809</updated>
|
|
670
657
|
</task>
|
|
671
|
-
<
|
|
658
|
+
<task id="LOCAL-00094" summary="2.2.8">
|
|
659
|
+
<created>1660529152942</created>
|
|
660
|
+
<option name="number" value="00094" />
|
|
661
|
+
<option name="presentableId" value="LOCAL-00094" />
|
|
662
|
+
<option name="project" value="LOCAL" />
|
|
663
|
+
<updated>1660529152943</updated>
|
|
664
|
+
</task>
|
|
665
|
+
<task id="LOCAL-00095" summary="优化标注信息显示">
|
|
666
|
+
<created>1663307741209</created>
|
|
667
|
+
<option name="number" value="00095" />
|
|
668
|
+
<option name="presentableId" value="LOCAL-00095" />
|
|
669
|
+
<option name="project" value="LOCAL" />
|
|
670
|
+
<updated>1663307741209</updated>
|
|
671
|
+
</task>
|
|
672
|
+
<task id="LOCAL-00096" summary="标注事件回调">
|
|
673
|
+
<created>1663310530025</created>
|
|
674
|
+
<option name="number" value="00096" />
|
|
675
|
+
<option name="presentableId" value="LOCAL-00096" />
|
|
676
|
+
<option name="project" value="LOCAL" />
|
|
677
|
+
<updated>1663310530025</updated>
|
|
678
|
+
</task>
|
|
679
|
+
<task id="LOCAL-00097" summary="2.2.9">
|
|
680
|
+
<created>1663310718298</created>
|
|
681
|
+
<option name="number" value="00097" />
|
|
682
|
+
<option name="presentableId" value="LOCAL-00097" />
|
|
683
|
+
<option name="project" value="LOCAL" />
|
|
684
|
+
<updated>1663310718298</updated>
|
|
685
|
+
</task>
|
|
686
|
+
<option name="localTasksCounter" value="98" />
|
|
672
687
|
<servers />
|
|
673
688
|
</component>
|
|
674
689
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -710,10 +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
728
|
<MESSAGE value="enableDbClickClose" />
|
|
718
729
|
<MESSAGE value="2.1.20" />
|
|
719
730
|
<MESSAGE value="view.js" />
|
|
@@ -735,7 +746,11 @@
|
|
|
735
746
|
<MESSAGE value="触发限制优化" />
|
|
736
747
|
<MESSAGE value="增加图片绘制" />
|
|
737
748
|
<MESSAGE value="2.2.5" />
|
|
738
|
-
<
|
|
749
|
+
<MESSAGE value="2.2.8" />
|
|
750
|
+
<MESSAGE value="优化标注信息显示" />
|
|
751
|
+
<MESSAGE value="标注事件回调" />
|
|
752
|
+
<MESSAGE value="2.2.9" />
|
|
753
|
+
<option name="LAST_COMMIT_MESSAGE" value="2.2.9" />
|
|
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 = [];
|