kfb-view 3.0.6 → 3.0.7
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 +58 -34
- package/config/webpack.dev.conf.js +3 -3
- package/example/index.js +16 -49
- package/lib/kfb-view.js +1 -1
- package/package.json +1 -1
- package/src/view.js +1 -1
package/.idea/workspace.xml
CHANGED
|
@@ -39,12 +39,11 @@
|
|
|
39
39
|
</select>
|
|
40
40
|
</component>
|
|
41
41
|
<component name="ChangeListManager">
|
|
42
|
-
<list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="
|
|
42
|
+
<list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="">
|
|
43
43
|
<change beforePath="$PROJECT_DIR$/config/webpack.dev.conf.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/webpack.dev.conf.js" afterDir="false" />
|
|
44
44
|
<change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
|
|
45
45
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
46
|
-
<change beforePath="$PROJECT_DIR$/src/
|
|
47
|
-
<change beforePath="$PROJECT_DIR$/src/components/shape/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/shape/index.js" afterDir="false" />
|
|
46
|
+
<change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
|
|
48
47
|
</list>
|
|
49
48
|
<option name="SHOW_DIALOG" value="false" />
|
|
50
49
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
<component name="Git.Settings">
|
|
64
63
|
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
|
65
64
|
<map>
|
|
66
|
-
<entry key="$PROJECT_DIR$" value="release/
|
|
65
|
+
<entry key="$PROJECT_DIR$" value="release/2.4.2" />
|
|
67
66
|
</map>
|
|
68
67
|
</option>
|
|
69
68
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
@@ -71,6 +70,29 @@
|
|
|
71
70
|
</component>
|
|
72
71
|
<component name="GitToolBoxStore">
|
|
73
72
|
<option name="projectConfigVersion" value="5" />
|
|
73
|
+
<option name="recentBranches">
|
|
74
|
+
<RecentBranches>
|
|
75
|
+
<option name="branchesForRepo">
|
|
76
|
+
<list>
|
|
77
|
+
<RecentBranchesForRepo>
|
|
78
|
+
<option name="branches">
|
|
79
|
+
<list>
|
|
80
|
+
<RecentBranch>
|
|
81
|
+
<option name="branchName" value="master" />
|
|
82
|
+
<option name="lastUsedInstant" value="1680964701" />
|
|
83
|
+
</RecentBranch>
|
|
84
|
+
<RecentBranch>
|
|
85
|
+
<option name="branchName" value="release/2.4.2" />
|
|
86
|
+
<option name="lastUsedInstant" value="1680859509" />
|
|
87
|
+
</RecentBranch>
|
|
88
|
+
</list>
|
|
89
|
+
</option>
|
|
90
|
+
<option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
|
|
91
|
+
</RecentBranchesForRepo>
|
|
92
|
+
</list>
|
|
93
|
+
</option>
|
|
94
|
+
</RecentBranches>
|
|
95
|
+
</option>
|
|
74
96
|
</component>
|
|
75
97
|
<component name="MarkdownSettingsMigration">
|
|
76
98
|
<option name="stateVersion" value="1" />
|
|
@@ -179,10 +201,10 @@
|
|
|
179
201
|
<recent_temporary>
|
|
180
202
|
<list>
|
|
181
203
|
<item itemvalue="npm.server:hot" />
|
|
182
|
-
<item itemvalue="npm.build:lib" />
|
|
183
|
-
<item itemvalue="npm.server" />
|
|
184
204
|
<item itemvalue="npm.clean:lib" />
|
|
205
|
+
<item itemvalue="npm.server" />
|
|
185
206
|
<item itemvalue="npm.build:prod" />
|
|
207
|
+
<item itemvalue="npm.build:lib" />
|
|
186
208
|
</list>
|
|
187
209
|
</recent_temporary>
|
|
188
210
|
</component>
|
|
@@ -423,28 +445,9 @@
|
|
|
423
445
|
<workItem from="1680746491709" duration="597000" />
|
|
424
446
|
<workItem from="1680750141486" duration="416000" />
|
|
425
447
|
<workItem from="1680834237716" duration="2982000" />
|
|
426
|
-
<workItem from="1680858434486" duration="
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
<created>1657607434015</created>
|
|
430
|
-
<option name="number" value="00079" />
|
|
431
|
-
<option name="presentableId" value="LOCAL-00079" />
|
|
432
|
-
<option name="project" value="LOCAL" />
|
|
433
|
-
<updated>1657607434015</updated>
|
|
434
|
-
</task>
|
|
435
|
-
<task id="LOCAL-00080" summary="2.2.0">
|
|
436
|
-
<created>1657607449348</created>
|
|
437
|
-
<option name="number" value="00080" />
|
|
438
|
-
<option name="presentableId" value="LOCAL-00080" />
|
|
439
|
-
<option name="project" value="LOCAL" />
|
|
440
|
-
<updated>1657607449348</updated>
|
|
441
|
-
</task>
|
|
442
|
-
<task id="LOCAL-00081" summary="加载速度优化">
|
|
443
|
-
<created>1657612318446</created>
|
|
444
|
-
<option name="number" value="00081" />
|
|
445
|
-
<option name="presentableId" value="LOCAL-00081" />
|
|
446
|
-
<option name="project" value="LOCAL" />
|
|
447
|
-
<updated>1657612318447</updated>
|
|
448
|
+
<workItem from="1680858434486" duration="1348000" />
|
|
449
|
+
<workItem from="1680861296669" duration="2435000" />
|
|
450
|
+
<workItem from="1681268502306" duration="3044000" />
|
|
448
451
|
</task>
|
|
449
452
|
<task id="LOCAL-00082" summary="2.2.1">
|
|
450
453
|
<created>1657612343466</created>
|
|
@@ -768,7 +771,28 @@
|
|
|
768
771
|
<option name="project" value="LOCAL" />
|
|
769
772
|
<updated>1680847205108</updated>
|
|
770
773
|
</task>
|
|
771
|
-
<
|
|
774
|
+
<task id="LOCAL-00128" summary="build:3.0.6 修复填充图形绘制时显示异常">
|
|
775
|
+
<created>1680859251199</created>
|
|
776
|
+
<option name="number" value="00128" />
|
|
777
|
+
<option name="presentableId" value="LOCAL-00128" />
|
|
778
|
+
<option name="project" value="LOCAL" />
|
|
779
|
+
<updated>1680859251199</updated>
|
|
780
|
+
</task>
|
|
781
|
+
<task id="LOCAL-00129" summary="build:3.0.6 填充图形绘制时,内容偏移">
|
|
782
|
+
<created>1680859385125</created>
|
|
783
|
+
<option name="number" value="00129" />
|
|
784
|
+
<option name="presentableId" value="LOCAL-00129" />
|
|
785
|
+
<option name="project" value="LOCAL" />
|
|
786
|
+
<updated>1680859385125</updated>
|
|
787
|
+
</task>
|
|
788
|
+
<task id="LOCAL-00130" summary="build:2.4.2, 填充图形绘制时偏移">
|
|
789
|
+
<created>1680859536589</created>
|
|
790
|
+
<option name="number" value="00130" />
|
|
791
|
+
<option name="presentableId" value="LOCAL-00130" />
|
|
792
|
+
<option name="project" value="LOCAL" />
|
|
793
|
+
<updated>1680859536589</updated>
|
|
794
|
+
</task>
|
|
795
|
+
<option name="localTasksCounter" value="131" />
|
|
772
796
|
<servers />
|
|
773
797
|
</component>
|
|
774
798
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -796,7 +820,7 @@
|
|
|
796
820
|
<entry key="branch">
|
|
797
821
|
<value>
|
|
798
822
|
<list>
|
|
799
|
-
<option value="
|
|
823
|
+
<option value="release/2.4.2" />
|
|
800
824
|
</list>
|
|
801
825
|
</value>
|
|
802
826
|
</entry>
|
|
@@ -811,9 +835,6 @@
|
|
|
811
835
|
<component name="VcsManagerConfiguration">
|
|
812
836
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
|
813
837
|
<option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
|
|
814
|
-
<MESSAGE value="label.model.js" />
|
|
815
|
-
<MESSAGE value="解决反向绘制时,标注信息显示错误" />
|
|
816
|
-
<MESSAGE value="2.3.1" />
|
|
817
838
|
<MESSAGE value="优化渲染速度" />
|
|
818
839
|
<MESSAGE value="2.3.2" />
|
|
819
840
|
<MESSAGE value="优化速度" />
|
|
@@ -836,7 +857,10 @@
|
|
|
836
857
|
<MESSAGE value="build:3.0.3 截图支持设置分辨率,质量,格式" />
|
|
837
858
|
<MESSAGE value="build:3.0.3导航图宽高限制" />
|
|
838
859
|
<MESSAGE value="build:3.0.5 截图记录位置信息" />
|
|
839
|
-
<
|
|
860
|
+
<MESSAGE value="build:3.0.6 修复填充图形绘制时显示异常" />
|
|
861
|
+
<MESSAGE value="build:3.0.6 填充图形绘制时,内容偏移" />
|
|
862
|
+
<MESSAGE value="build:2.4.2, 填充图形绘制时偏移" />
|
|
863
|
+
<option name="LAST_COMMIT_MESSAGE" value="build:2.4.2, 填充图形绘制时偏移" />
|
|
840
864
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
|
841
865
|
</component>
|
|
842
866
|
<component name="XSLT-Support.FileAssociations.UIState">
|
|
@@ -3,7 +3,7 @@ const webpackMerge = require('webpack-merge');
|
|
|
3
3
|
const baseWebpackConfig = require('./webpack.base.conf');
|
|
4
4
|
const METADATA = webpackMerge(baseWebpackConfig().metadata, {
|
|
5
5
|
host: '0.0.0.0',
|
|
6
|
-
port:
|
|
6
|
+
port: 3001,
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
process.env.NODE_ENV = process.env.NODE_ENV ?
|
|
@@ -66,11 +66,11 @@ module.exports = function() {
|
|
|
66
66
|
// target: 'http://gastric.label.hzztai.com/',
|
|
67
67
|
// target: 'http://192.168.1.91:7007',
|
|
68
68
|
// target: 'http://192.168.1.91',
|
|
69
|
-
target: 'http://192.168.1.
|
|
70
|
-
// target: 'https://vai.hzztai.com',
|
|
69
|
+
// target: 'http://192.168.1.16',
|
|
71
70
|
// target: 'https://tct.hzztai.com',
|
|
72
71
|
// target: 'https://pis-ningbo.hzztai.com',
|
|
73
72
|
// target: 'https://pis-test.hzztai.com',
|
|
73
|
+
target: 'https://telepathology.adicon.com.cn',
|
|
74
74
|
secure: false,
|
|
75
75
|
changeOrigin: true,
|
|
76
76
|
},
|
package/example/index.js
CHANGED
|
@@ -25,7 +25,7 @@ deleteEmptyImg.src = deleteEmptySvg;
|
|
|
25
25
|
const hasAuditImg = new Image();
|
|
26
26
|
hasAuditImg.src = hasAuditSvg;
|
|
27
27
|
|
|
28
|
-
const fileName = '
|
|
28
|
+
const fileName = '/data/ftp/950/22/slides/B20230069032023-03-12_16_41_56.kfb';
|
|
29
29
|
|
|
30
30
|
const instance = axios.create({
|
|
31
31
|
baseURL: '/api',
|
|
@@ -48,7 +48,7 @@ const debounce = (func, delay) => {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
instance.get(`/
|
|
51
|
+
instance.get(`/common/kfb/info?file=${fileName}`).then(({data}) => {
|
|
52
52
|
let params = {};
|
|
53
53
|
params.file = fileName;
|
|
54
54
|
data = data.data;
|
|
@@ -69,18 +69,15 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
69
69
|
bottom: 10,
|
|
70
70
|
},
|
|
71
71
|
navigator: {
|
|
72
|
-
|
|
73
|
-
style: '
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
disabled: false,
|
|
73
|
+
style: 'right: 0;top: 0',
|
|
74
|
+
thumbnail: `/api/slide/getImage?file=${fileName}&type=thumbnail`,
|
|
75
|
+
scale: data.scanScale,
|
|
76
76
|
},
|
|
77
77
|
pxConversion: {
|
|
78
78
|
unit: 'um',
|
|
79
79
|
imageCapRes: data.imageCapRes || 1,
|
|
80
80
|
},
|
|
81
|
-
tailoring: {
|
|
82
|
-
suffix: 'png',
|
|
83
|
-
},
|
|
84
81
|
grid: {
|
|
85
82
|
show: false,
|
|
86
83
|
ruler: false,
|
|
@@ -358,8 +355,8 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
358
355
|
kv.board.startDraw({
|
|
359
356
|
tool: KfbView.marks.POLYGON,
|
|
360
357
|
once: true,
|
|
358
|
+
isClose: false,
|
|
361
359
|
enableDbClickClose: true,
|
|
362
|
-
fillStyle: '#0000ff8d',
|
|
363
360
|
});
|
|
364
361
|
};
|
|
365
362
|
curve1.onclick = () => {
|
|
@@ -367,7 +364,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
367
364
|
tool: KfbView.marks.POLYGON,
|
|
368
365
|
once: true,
|
|
369
366
|
enableDbClickClose: true,
|
|
370
|
-
fillStyle: '#0000ff8d',
|
|
371
367
|
});
|
|
372
368
|
};
|
|
373
369
|
/* kv.viewer.addHandler('tile-loaded', (e) => {
|
|
@@ -400,24 +396,16 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
400
396
|
});
|
|
401
397
|
const {width, height} = kv.$options;
|
|
402
398
|
kv.$on(KfbView.events.EVENT_TAILORING_SCREENSHOT, (e) => {
|
|
403
|
-
|
|
404
|
-
if (window.ClipboardItem && navigator?.clipboard) {
|
|
405
|
-
navigator.clipboard.write([
|
|
406
|
-
new window.ClipboardItem({
|
|
407
|
-
[blob.type]: blob,
|
|
408
|
-
}),
|
|
409
|
-
]);
|
|
410
|
-
}
|
|
399
|
+
console.log(e.detail);
|
|
411
400
|
});
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
});
|
|
401
|
+
/* kv.tailoring.init(
|
|
402
|
+
{
|
|
403
|
+
left: width / 2 - 100,
|
|
404
|
+
top: height / 2 - 100,
|
|
405
|
+
height: 200,
|
|
406
|
+
width: 200,
|
|
407
|
+
color: '#F00',
|
|
408
|
+
});*/
|
|
421
409
|
setTimeout(() => {
|
|
422
410
|
// kv.destroy();
|
|
423
411
|
setTimeout(() => {
|
|
@@ -462,15 +450,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
462
450
|
document.querySelector('#g').value = 0;
|
|
463
451
|
document.querySelector('#b').value = 0;
|
|
464
452
|
kv.viewer.forceRedraw();
|
|
465
|
-
/* const { width, height } = kv.$options;
|
|
466
|
-
kv.tailoring.init(
|
|
467
|
-
{
|
|
468
|
-
left: width / 2 - 100,
|
|
469
|
-
top: height / 2 - 100,
|
|
470
|
-
height: 200,
|
|
471
|
-
width: 200,
|
|
472
|
-
color: '#ff0000',
|
|
473
|
-
});*/
|
|
474
453
|
});
|
|
475
454
|
|
|
476
455
|
/*
|
|
@@ -551,18 +530,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
|
|
|
551
530
|
});*/
|
|
552
531
|
});
|
|
553
532
|
|
|
554
|
-
function dataURLtoBlob(dataurl) {
|
|
555
|
-
const arr = dataurl.split(',');
|
|
556
|
-
const mime = arr[0].match(/:(.*?);/)[1];
|
|
557
|
-
const bstr = atob(arr[1]);
|
|
558
|
-
let n = bstr.length;
|
|
559
|
-
const u8arr = new Uint8Array(n);
|
|
560
|
-
while (n--) {
|
|
561
|
-
u8arr[n] = bstr.charCodeAt(n);
|
|
562
|
-
}
|
|
563
|
-
return new Blob([u8arr], {type: mime});
|
|
564
|
-
}
|
|
565
|
-
|
|
566
533
|
/**
|
|
567
534
|
* 解析参数,生成对应的请求参数字符串
|
|
568
535
|
* @param {Object} data
|