kfb-view 2.1.14 → 2.1.17
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 -45
- package/example/index.js +29 -3
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/components/common/common.js +48 -28
- package/src/components/shape/index.js +39 -20
- package/src/model/label.model.js +1 -1
- package/src/tool/Brush.js +1 -3
- package/src/tool/Font.js +2 -3
- package/src/tool/Star.js +0 -1
- package/src/util/canvas.js +0 -1
- package/src/view.js +1 -3
- package/test.html +24 -93
package/.idea/workspace.xml
CHANGED
|
@@ -37,7 +37,17 @@
|
|
|
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.html" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.html" afterDir="false" />
|
|
41
|
+
<change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
|
|
40
42
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
43
|
+
<change beforePath="$PROJECT_DIR$/src/components/common/common.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/common/common.js" afterDir="false" />
|
|
44
|
+
<change beforePath="$PROJECT_DIR$/src/components/shape/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/shape/index.js" afterDir="false" />
|
|
45
|
+
<change beforePath="$PROJECT_DIR$/src/model/label.model.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/model/label.model.js" afterDir="false" />
|
|
46
|
+
<change beforePath="$PROJECT_DIR$/src/tool/Brush.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Brush.js" afterDir="false" />
|
|
47
|
+
<change beforePath="$PROJECT_DIR$/src/tool/Font.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Font.js" afterDir="false" />
|
|
48
|
+
<change beforePath="$PROJECT_DIR$/src/tool/Star.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/tool/Star.js" afterDir="false" />
|
|
49
|
+
<change beforePath="$PROJECT_DIR$/src/util/canvas.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/util/canvas.js" afterDir="false" />
|
|
50
|
+
<change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
|
|
41
51
|
</list>
|
|
42
52
|
<option name="SHOW_DIALOG" value="false" />
|
|
43
53
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -77,7 +87,7 @@
|
|
|
77
87
|
"DefaultHtmlFileTemplate": "HTML File",
|
|
78
88
|
"WebServerToolWindowFactoryState": "false",
|
|
79
89
|
"dart.analysis.tool.window.visible": "false",
|
|
80
|
-
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/
|
|
90
|
+
"last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb_view_example",
|
|
81
91
|
"node.js.detected.package.eslint": "true",
|
|
82
92
|
"node.js.selected.package.eslint": "(autodetect)",
|
|
83
93
|
"nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
|
|
@@ -102,7 +112,7 @@
|
|
|
102
112
|
<recent name="$PROJECT_DIR$/src/components" />
|
|
103
113
|
</key>
|
|
104
114
|
</component>
|
|
105
|
-
<component name="RunManager" selected="npm.
|
|
115
|
+
<component name="RunManager" selected="npm.build:lib">
|
|
106
116
|
<configuration name="build:lib" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
|
107
117
|
<package-json value="$PROJECT_DIR$/package.json" />
|
|
108
118
|
<command value="run" />
|
|
@@ -281,42 +291,8 @@
|
|
|
281
291
|
<workItem from="1650589238076" duration="604000" />
|
|
282
292
|
<workItem from="1650594995272" duration="693000" />
|
|
283
293
|
<workItem from="1650933544613" duration="12971000" />
|
|
284
|
-
<workItem from="1650955699322" duration="
|
|
285
|
-
|
|
286
|
-
<task id="LOCAL-00008" summary="修改">
|
|
287
|
-
<created>1602570373318</created>
|
|
288
|
-
<option name="number" value="00008" />
|
|
289
|
-
<option name="presentableId" value="LOCAL-00008" />
|
|
290
|
-
<option name="project" value="LOCAL" />
|
|
291
|
-
<updated>1602570373318</updated>
|
|
292
|
-
</task>
|
|
293
|
-
<task id="LOCAL-00009" summary="增加label.model">
|
|
294
|
-
<created>1602667014871</created>
|
|
295
|
-
<option name="number" value="00009" />
|
|
296
|
-
<option name="presentableId" value="LOCAL-00009" />
|
|
297
|
-
<option name="project" value="LOCAL" />
|
|
298
|
-
<updated>1602667014871</updated>
|
|
299
|
-
</task>
|
|
300
|
-
<task id="LOCAL-00010" summary="修改">
|
|
301
|
-
<created>1603680173692</created>
|
|
302
|
-
<option name="number" value="00010" />
|
|
303
|
-
<option name="presentableId" value="LOCAL-00010" />
|
|
304
|
-
<option name="project" value="LOCAL" />
|
|
305
|
-
<updated>1603680173692</updated>
|
|
306
|
-
</task>
|
|
307
|
-
<task id="LOCAL-00011" summary="修改">
|
|
308
|
-
<created>1605162932797</created>
|
|
309
|
-
<option name="number" value="00011" />
|
|
310
|
-
<option name="presentableId" value="LOCAL-00011" />
|
|
311
|
-
<option name="project" value="LOCAL" />
|
|
312
|
-
<updated>1605162932798</updated>
|
|
313
|
-
</task>
|
|
314
|
-
<task id="LOCAL-00012" summary="增加DOT方法">
|
|
315
|
-
<created>1607062988217</created>
|
|
316
|
-
<option name="number" value="00012" />
|
|
317
|
-
<option name="presentableId" value="LOCAL-00012" />
|
|
318
|
-
<option name="project" value="LOCAL" />
|
|
319
|
-
<updated>1607062988217</updated>
|
|
294
|
+
<workItem from="1650955699322" duration="15593000" />
|
|
295
|
+
<workItem from="1651017904143" duration="11080000" />
|
|
320
296
|
</task>
|
|
321
297
|
<task id="LOCAL-00013" summary="dot缩放">
|
|
322
298
|
<created>1607069786469</created>
|
|
@@ -626,7 +602,42 @@
|
|
|
626
602
|
<option name="project" value="LOCAL" />
|
|
627
603
|
<updated>1650964615095</updated>
|
|
628
604
|
</task>
|
|
629
|
-
<
|
|
605
|
+
<task id="LOCAL-00057" summary="2.1.14">
|
|
606
|
+
<created>1650964634147</created>
|
|
607
|
+
<option name="number" value="00057" />
|
|
608
|
+
<option name="presentableId" value="LOCAL-00057" />
|
|
609
|
+
<option name="project" value="LOCAL" />
|
|
610
|
+
<updated>1650964634147</updated>
|
|
611
|
+
</task>
|
|
612
|
+
<task id="LOCAL-00058" summary="闭合区域">
|
|
613
|
+
<created>1650965871446</created>
|
|
614
|
+
<option name="number" value="00058" />
|
|
615
|
+
<option name="presentableId" value="LOCAL-00058" />
|
|
616
|
+
<option name="project" value="LOCAL" />
|
|
617
|
+
<updated>1650965871446</updated>
|
|
618
|
+
</task>
|
|
619
|
+
<task id="LOCAL-00059" summary="2.1.15">
|
|
620
|
+
<created>1650965886754</created>
|
|
621
|
+
<option name="number" value="00059" />
|
|
622
|
+
<option name="presentableId" value="LOCAL-00059" />
|
|
623
|
+
<option name="project" value="LOCAL" />
|
|
624
|
+
<updated>1650965886754</updated>
|
|
625
|
+
</task>
|
|
626
|
+
<task id="LOCAL-00060" summary="闭合曲线">
|
|
627
|
+
<created>1650966647247</created>
|
|
628
|
+
<option name="number" value="00060" />
|
|
629
|
+
<option name="presentableId" value="LOCAL-00060" />
|
|
630
|
+
<option name="project" value="LOCAL" />
|
|
631
|
+
<updated>1650966647247</updated>
|
|
632
|
+
</task>
|
|
633
|
+
<task id="LOCAL-00061" summary="2.1.16">
|
|
634
|
+
<created>1650967323558</created>
|
|
635
|
+
<option name="number" value="00061" />
|
|
636
|
+
<option name="presentableId" value="LOCAL-00061" />
|
|
637
|
+
<option name="project" value="LOCAL" />
|
|
638
|
+
<updated>1650967323558</updated>
|
|
639
|
+
</task>
|
|
640
|
+
<option name="localTasksCounter" value="62" />
|
|
630
641
|
<servers />
|
|
631
642
|
</component>
|
|
632
643
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -668,11 +679,6 @@
|
|
|
668
679
|
<component name="VcsManagerConfiguration">
|
|
669
680
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
670
681
|
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
|
|
671
|
-
<MESSAGE value="组合标注增加ellipse和rect" />
|
|
672
|
-
<MESSAGE value="2.0.17" />
|
|
673
|
-
<MESSAGE value="标签优化" />
|
|
674
|
-
<MESSAGE value="2.1.1" />
|
|
675
|
-
<MESSAGE value="eslint" />
|
|
676
682
|
<MESSAGE value="Curve is obsolete. Please use polygon instead" />
|
|
677
683
|
<MESSAGE value="优化调整" />
|
|
678
684
|
<MESSAGE value="2.1.2" />
|
|
@@ -693,7 +699,12 @@
|
|
|
693
699
|
<MESSAGE value="重写绘制逻辑" />
|
|
694
700
|
<MESSAGE value="package.json" />
|
|
695
701
|
<MESSAGE value="组合框异常" />
|
|
696
|
-
<
|
|
702
|
+
<MESSAGE value="2.1.14" />
|
|
703
|
+
<MESSAGE value="闭合区域" />
|
|
704
|
+
<MESSAGE value="2.1.15" />
|
|
705
|
+
<MESSAGE value="闭合曲线" />
|
|
706
|
+
<MESSAGE value="2.1.16" />
|
|
707
|
+
<option name="LAST_COMMIT_MESSAGE" value="2.1.16" />
|
|
697
708
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
|
698
709
|
</component>
|
|
699
710
|
<component name="XSLT-Support.FileAssociations.UIState">
|
package/example/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {KfbView, hslToRgb, rgbToHsl, cacheGammaTable} from '../src';
|
|
2
2
|
import axios from 'axios';
|
|
3
|
-
import {EVENT_TAILORING_SCREENSHOT} from '../src/const/event';
|
|
4
3
|
|
|
5
4
|
const fileName = '/upload/large_file/last/2022/04/26/d31a31bf1ae5b73fca63f72e2affc879/胃镜1.kfb';
|
|
6
5
|
|
|
@@ -37,7 +36,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
37
36
|
drag: true,
|
|
38
37
|
},
|
|
39
38
|
board: {
|
|
40
|
-
ROI:
|
|
39
|
+
ROI: false,
|
|
41
40
|
},
|
|
42
41
|
graduation: {
|
|
43
42
|
right: 30,
|
|
@@ -211,11 +210,13 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
211
210
|
kv.board.startDraw({
|
|
212
211
|
tool: KfbView.marks.RECTANGLE,
|
|
213
212
|
lineWidth: 10,
|
|
214
|
-
isROI:
|
|
213
|
+
isROI: false,
|
|
215
214
|
once: true,
|
|
216
215
|
measure: false,
|
|
217
216
|
resize: false,
|
|
218
217
|
move: false,
|
|
218
|
+
fillStyle: '#ff00ff8d',
|
|
219
|
+
isClose: true,
|
|
219
220
|
});
|
|
220
221
|
};
|
|
221
222
|
line.onclick = () => {
|
|
@@ -311,6 +312,31 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
|
|
|
311
312
|
setTimeout(() => {
|
|
312
313
|
// kv.destroy();
|
|
313
314
|
}, 6000);
|
|
315
|
+
initLabels();
|
|
316
|
+
|
|
317
|
+
function initLabels() {
|
|
318
|
+
const labels = [];
|
|
319
|
+
for (let i = 0; i < 10000; i++) {
|
|
320
|
+
const point = {
|
|
321
|
+
x: data.width / 2 + Math.random() * 10000,
|
|
322
|
+
y: data.height / 2 + Math.random() * 10000,
|
|
323
|
+
};
|
|
324
|
+
const label = {
|
|
325
|
+
// fillStyle: 'rgba(2, 122, 255, 1)',
|
|
326
|
+
lineWidth: 6,
|
|
327
|
+
points: [point, point],
|
|
328
|
+
scale: 0.1,
|
|
329
|
+
strokeStyle: '#027AFF',
|
|
330
|
+
tool: 'Dot',
|
|
331
|
+
};
|
|
332
|
+
labels.push(label);
|
|
333
|
+
}
|
|
334
|
+
kv.initLabelList(labels);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
document.querySelector('#reDraw').addEventListener('click', () => {
|
|
338
|
+
initLabels();
|
|
339
|
+
});
|
|
314
340
|
});
|
|
315
341
|
|
|
316
342
|
/**
|