kfb-view 3.0.6 → 3.0.8

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.
@@ -39,12 +39,12 @@
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="build:3.0.1">
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/components/board/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/board/index.js" afterDir="false" />
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/components/grid/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/grid/index.js" afterDir="false" />
47
+ <change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
48
48
  </list>
49
49
  <option name="SHOW_DIALOG" value="false" />
50
50
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -63,7 +63,7 @@
63
63
  <component name="Git.Settings">
64
64
  <option name="RECENT_BRANCH_BY_REPOSITORY">
65
65
  <map>
66
- <entry key="$PROJECT_DIR$" value="release/1.7.36" />
66
+ <entry key="$PROJECT_DIR$" value="release/2.4.2" />
67
67
  </map>
68
68
  </option>
69
69
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -71,6 +71,29 @@
71
71
  </component>
72
72
  <component name="GitToolBoxStore">
73
73
  <option name="projectConfigVersion" value="5" />
74
+ <option name="recentBranches">
75
+ <RecentBranches>
76
+ <option name="branchesForRepo">
77
+ <list>
78
+ <RecentBranchesForRepo>
79
+ <option name="branches">
80
+ <list>
81
+ <RecentBranch>
82
+ <option name="branchName" value="master" />
83
+ <option name="lastUsedInstant" value="1680964701" />
84
+ </RecentBranch>
85
+ <RecentBranch>
86
+ <option name="branchName" value="release/2.4.2" />
87
+ <option name="lastUsedInstant" value="1680859509" />
88
+ </RecentBranch>
89
+ </list>
90
+ </option>
91
+ <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
92
+ </RecentBranchesForRepo>
93
+ </list>
94
+ </option>
95
+ </RecentBranches>
96
+ </option>
74
97
  </component>
75
98
  <component name="MarkdownSettingsMigration">
76
99
  <option name="stateVersion" value="1" />
@@ -180,8 +203,8 @@
180
203
  <list>
181
204
  <item itemvalue="npm.server:hot" />
182
205
  <item itemvalue="npm.build:lib" />
183
- <item itemvalue="npm.server" />
184
206
  <item itemvalue="npm.clean:lib" />
207
+ <item itemvalue="npm.server" />
185
208
  <item itemvalue="npm.build:prod" />
186
209
  </list>
187
210
  </recent_temporary>
@@ -423,35 +446,12 @@
423
446
  <workItem from="1680746491709" duration="597000" />
424
447
  <workItem from="1680750141486" duration="416000" />
425
448
  <workItem from="1680834237716" duration="2982000" />
426
- <workItem from="1680858434486" duration="773000" />
427
- </task>
428
- <task id="LOCAL-00079" summary="2.20.0">
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
- </task>
449
- <task id="LOCAL-00082" summary="2.2.1">
450
- <created>1657612343466</created>
451
- <option name="number" value="00082" />
452
- <option name="presentableId" value="LOCAL-00082" />
453
- <option name="project" value="LOCAL" />
454
- <updated>1657612343466</updated>
449
+ <workItem from="1680858434486" duration="1348000" />
450
+ <workItem from="1680861296669" duration="2435000" />
451
+ <workItem from="1681268502306" duration="3934000" />
452
+ <workItem from="1681279285513" duration="137000" />
453
+ <workItem from="1681978839304" duration="679000" />
454
+ <workItem from="1682382064540" duration="1428000" />
455
455
  </task>
456
456
  <task id="LOCAL-00083" summary="index.js">
457
457
  <created>1657785699795</created>
@@ -768,7 +768,35 @@
768
768
  <option name="project" value="LOCAL" />
769
769
  <updated>1680847205108</updated>
770
770
  </task>
771
- <option name="localTasksCounter" value="128" />
771
+ <task id="LOCAL-00128" summary="build:3.0.6 修复填充图形绘制时显示异常">
772
+ <created>1680859251199</created>
773
+ <option name="number" value="00128" />
774
+ <option name="presentableId" value="LOCAL-00128" />
775
+ <option name="project" value="LOCAL" />
776
+ <updated>1680859251199</updated>
777
+ </task>
778
+ <task id="LOCAL-00129" summary="build:3.0.6 填充图形绘制时,内容偏移">
779
+ <created>1680859385125</created>
780
+ <option name="number" value="00129" />
781
+ <option name="presentableId" value="LOCAL-00129" />
782
+ <option name="project" value="LOCAL" />
783
+ <updated>1680859385125</updated>
784
+ </task>
785
+ <task id="LOCAL-00130" summary="build:2.4.2, 填充图形绘制时偏移">
786
+ <created>1680859536589</created>
787
+ <option name="number" value="00130" />
788
+ <option name="presentableId" value="LOCAL-00130" />
789
+ <option name="project" value="LOCAL" />
790
+ <updated>1680859536589</updated>
791
+ </task>
792
+ <task id="LOCAL-00131" summary="build:3.0.7, 键盘按钮移动">
793
+ <created>1681277913648</created>
794
+ <option name="number" value="00131" />
795
+ <option name="presentableId" value="LOCAL-00131" />
796
+ <option name="project" value="LOCAL" />
797
+ <updated>1681277913649</updated>
798
+ </task>
799
+ <option name="localTasksCounter" value="132" />
772
800
  <servers />
773
801
  </component>
774
802
  <component name="TypeScriptGeneratedFilesManager">
@@ -796,7 +824,7 @@
796
824
  <entry key="branch">
797
825
  <value>
798
826
  <list>
799
- <option value="master" />
827
+ <option value="release/2.4.2" />
800
828
  </list>
801
829
  </value>
802
830
  </entry>
@@ -811,10 +839,6 @@
811
839
  <component name="VcsManagerConfiguration">
812
840
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
813
841
  <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
- <MESSAGE value="优化渲染速度" />
818
842
  <MESSAGE value="2.3.2" />
819
843
  <MESSAGE value="优化速度" />
820
844
  <MESSAGE value="2.3.3" />
@@ -836,7 +860,11 @@
836
860
  <MESSAGE value="build:3.0.3 截图支持设置分辨率,质量,格式" />
837
861
  <MESSAGE value="build:3.0.3导航图宽高限制" />
838
862
  <MESSAGE value="build:3.0.5 截图记录位置信息" />
839
- <option name="LAST_COMMIT_MESSAGE" value="build:3.0.5 截图记录位置信息" />
863
+ <MESSAGE value="build:3.0.6 修复填充图形绘制时显示异常" />
864
+ <MESSAGE value="build:3.0.6 填充图形绘制时,内容偏移" />
865
+ <MESSAGE value="build:2.4.2, 填充图形绘制时偏移" />
866
+ <MESSAGE value="build:3.0.7, 键盘按钮移动" />
867
+ <option name="LAST_COMMIT_MESSAGE" value="build:3.0.7, 键盘按钮移动" />
840
868
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
841
869
  </component>
842
870
  <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: 3101,
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.22',
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 = 'uploads/TCT/已入库/guangzhou_fuer_hospital/pos/labeling/LSIL/MY22004_other_2022-08-22_LSIL_切片2.kfb';
28
+ const fileName = '/data/ftp/4702/16/slides/B20230126582023-04-23_18_03_58.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(`/process/info?file=${fileName}`).then(({data}) => {
51
+ instance.get(`/common/kfb/info?file=${fileName}`).then(({data}) => {
52
52
  let params = {};
53
53
  params.file = fileName;
54
54
  data = data.data;
@@ -65,25 +65,23 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
65
65
  },
66
66
  graduation: {
67
67
  show: true,
68
- left: 30,
69
- bottom: 10,
68
+ right: 100,
69
+ top: 30,
70
70
  },
71
71
  navigator: {
72
- thumbnail: `/api/process/getImage?file=${fileName}&type=thumbnail`,
73
- style: 'left: 0;bottom: 0',
74
- width: 300,
75
- height: 300,
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
- ruler: false,
83
+ ruler: true,
84
+ pxConversion: false,
87
85
  },
88
86
  openSeadragonOptions: {
89
87
  maxZoomLevel: data.scanScale * 10,
@@ -358,8 +356,8 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
358
356
  kv.board.startDraw({
359
357
  tool: KfbView.marks.POLYGON,
360
358
  once: true,
359
+ isClose: false,
361
360
  enableDbClickClose: true,
362
- fillStyle: '#0000ff8d',
363
361
  });
364
362
  };
365
363
  curve1.onclick = () => {
@@ -367,7 +365,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
367
365
  tool: KfbView.marks.POLYGON,
368
366
  once: true,
369
367
  enableDbClickClose: true,
370
- fillStyle: '#0000ff8d',
371
368
  });
372
369
  };
373
370
  /* kv.viewer.addHandler('tile-loaded', (e) => {
@@ -400,24 +397,16 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
400
397
  });
401
398
  const {width, height} = kv.$options;
402
399
  kv.$on(KfbView.events.EVENT_TAILORING_SCREENSHOT, (e) => {
403
- const blob = dataURLtoBlob(e.detail);
404
- if (window.ClipboardItem && navigator?.clipboard) {
405
- navigator.clipboard.write([
406
- new window.ClipboardItem({
407
- [blob.type]: blob,
408
- }),
409
- ]);
410
- }
400
+ console.log(e.detail);
411
401
  });
412
-
413
- kv.tailoring.init(
414
- {
415
- left: 0,
416
- top: 0,
417
- height: 900,
418
- width: 1600,
419
- color: '#F00',
420
- });
402
+ /* kv.tailoring.init(
403
+ {
404
+ left: width / 2 - 100,
405
+ top: height / 2 - 100,
406
+ height: 200,
407
+ width: 200,
408
+ color: '#F00',
409
+ });*/
421
410
  setTimeout(() => {
422
411
  // kv.destroy();
423
412
  setTimeout(() => {
@@ -462,15 +451,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
462
451
  document.querySelector('#g').value = 0;
463
452
  document.querySelector('#b').value = 0;
464
453
  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
454
  });
475
455
 
476
456
  /*
@@ -551,18 +531,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
551
531
  });*/
552
532
  });
553
533
 
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
534
  /**
567
535
  * 解析参数,生成对应的请求参数字符串
568
536
  * @param {Object} data