kfb-view 2.1.20 → 2.2.2

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.
@@ -36,9 +36,7 @@
36
36
  </select>
37
37
  </component>
38
38
  <component name="ChangeListManager">
39
- <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="">
40
- <change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
41
- </list>
39
+ <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="" />
42
40
  <option name="SHOW_DIALOG" value="false" />
43
41
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
44
42
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -73,21 +71,21 @@
73
71
  <option name="hideEmptyMiddlePackages" value="true" />
74
72
  <option name="showLibraryContents" value="true" />
75
73
  </component>
76
- <component name="PropertiesComponent"><![CDATA[{
77
- "keyToString": {
78
- "DefaultHtmlFileTemplate": "HTML File",
79
- "WebServerToolWindowFactoryState": "false",
80
- "dart.analysis.tool.window.visible": "false",
81
- "last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
82
- "node.js.detected.package.eslint": "true",
83
- "node.js.selected.package.eslint": "(autodetect)",
84
- "nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
85
- "nodejs_package_manager_path": "npm",
86
- "settings.editor.selected.configurable": "settings.nodejs",
87
- "ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
88
- "vue.rearranger.settings.migration": "true"
74
+ <component name="PropertiesComponent">{
75
+ &quot;keyToString&quot;: {
76
+ &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
77
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
78
+ &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
79
+ &quot;last_opened_file_path&quot;: &quot;/home/fanqifeng/WebstormProjects/kfb-view&quot;,
80
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
81
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
82
+ &quot;nodejs_interpreter_path&quot;: &quot;/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node&quot;,
83
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
84
+ &quot;settings.editor.selected.configurable&quot;: &quot;settings.nodejs&quot;,
85
+ &quot;ts.external.directory.path&quot;: &quot;/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external&quot;,
86
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
89
87
  }
90
- }]]></component>
88
+ }</component>
91
89
  <component name="RecentsManager">
92
90
  <key name="CopyFile.RECENT_KEYS">
93
91
  <recent name="$PROJECT_DIR$/src/image" />
@@ -292,84 +290,14 @@
292
290
  <workItem from="1657274457584" duration="684000" />
293
291
  <workItem from="1657366256057" duration="578000" />
294
292
  <workItem from="1657519907711" duration="2848000" />
295
- <workItem from="1657527397247" duration="10426000" />
296
- </task>
297
- <task id="LOCAL-00026" summary="2.0.15">
298
- <created>1627457761721</created>
299
- <option name="number" value="00026" />
300
- <option name="presentableId" value="LOCAL-00026" />
301
- <option name="project" value="LOCAL" />
302
- <updated>1627457761721</updated>
303
- </task>
304
- <task id="LOCAL-00027" summary="优化代码结构">
305
- <created>1630487596681</created>
306
- <option name="number" value="00027" />
307
- <option name="presentableId" value="LOCAL-00027" />
308
- <option name="project" value="LOCAL" />
309
- <updated>1630487596681</updated>
310
- </task>
311
- <task id="LOCAL-00028" summary="2.0.16">
312
- <created>1630487867246</created>
313
- <option name="number" value="00028" />
314
- <option name="presentableId" value="LOCAL-00028" />
315
- <option name="project" value="LOCAL" />
316
- <updated>1630487867246</updated>
317
- </task>
318
- <task id="LOCAL-00029" summary="优化Curve标注,增加是否是闭合曲线参数">
319
- <created>1631607168244</created>
320
- <option name="number" value="00029" />
321
- <option name="presentableId" value="LOCAL-00029" />
322
- <option name="project" value="LOCAL" />
323
- <updated>1631607168244</updated>
324
- </task>
325
- <task id="LOCAL-00030" summary="优化Curve标注,增加组合">
326
- <created>1631623386433</created>
327
- <option name="number" value="00030" />
328
- <option name="presentableId" value="LOCAL-00030" />
329
- <option name="project" value="LOCAL" />
330
- <updated>1631623386433</updated>
331
- </task>
332
- <task id="LOCAL-00031" summary="组合标注增加ellipse和rect">
333
- <created>1631694555711</created>
334
- <option name="number" value="00031" />
335
- <option name="presentableId" value="LOCAL-00031" />
336
- <option name="project" value="LOCAL" />
337
- <updated>1631694555711</updated>
338
- </task>
339
- <task id="LOCAL-00032" summary="2.0.17">
340
- <created>1631694823499</created>
341
- <option name="number" value="00032" />
342
- <option name="presentableId" value="LOCAL-00032" />
343
- <option name="project" value="LOCAL" />
344
- <updated>1631694823499</updated>
345
- </task>
346
- <task id="LOCAL-00033" summary="标签优化">
347
- <created>1631756759803</created>
348
- <option name="number" value="00033" />
349
- <option name="presentableId" value="LOCAL-00033" />
350
- <option name="project" value="LOCAL" />
351
- <updated>1631756759803</updated>
352
- </task>
353
- <task id="LOCAL-00034" summary="标签优化">
354
- <created>1631757323462</created>
355
- <option name="number" value="00034" />
356
- <option name="presentableId" value="LOCAL-00034" />
357
- <option name="project" value="LOCAL" />
358
- <updated>1631757323462</updated>
359
- </task>
360
- <task id="LOCAL-00035" summary="2.1.1">
361
- <created>1631758578474</created>
362
- <option name="number" value="00035" />
363
- <option name="presentableId" value="LOCAL-00035" />
364
- <option name="project" value="LOCAL" />
365
- <updated>1631758578474</updated>
366
- </task>
367
- <task id="LOCAL-00036" summary="eslint">
368
- <created>1631760254126</created>
369
- <option name="number" value="00036" />
370
- <option name="presentableId" value="LOCAL-00036" />
371
- <option name="project" value="LOCAL" />
372
- <updated>1631760254126</updated>
293
+ <workItem from="1657527397247" duration="15173000" />
294
+ <workItem from="1657587519037" duration="20593000" />
295
+ <workItem from="1657785384118" duration="336000" />
296
+ <workItem from="1658133724686" duration="5036000" />
297
+ <workItem from="1658365477621" duration="2695000" />
298
+ <workItem from="1658371298489" duration="3932000" />
299
+ <workItem from="1658393509298" duration="2844000" />
300
+ <workItem from="1658398367362" duration="819000" />
373
301
  </task>
374
302
  <task id="LOCAL-00037" summary="Curve is obsolete. Please use polygon instead">
375
303
  <created>1631760521355</created>
@@ -637,7 +565,84 @@
637
565
  <option name="project" value="LOCAL" />
638
566
  <updated>1657539914133</updated>
639
567
  </task>
640
- <option name="localTasksCounter" value="75" />
568
+ <task id="LOCAL-00075" summary="view.js">
569
+ <created>1657540107150</created>
570
+ <option name="number" value="00075" />
571
+ <option name="presentableId" value="LOCAL-00075" />
572
+ <option name="project" value="LOCAL" />
573
+ <updated>1657540107150</updated>
574
+ </task>
575
+ <task id="LOCAL-00076" summary="优化选中点">
576
+ <created>1657588323251</created>
577
+ <option name="number" value="00076" />
578
+ <option name="presentableId" value="LOCAL-00076" />
579
+ <option name="project" value="LOCAL" />
580
+ <updated>1657588323252</updated>
581
+ </task>
582
+ <task id="LOCAL-00077" summary="优化标注图形显示,一次最多绘制5000个点,超过的标注延迟加载">
583
+ <created>1657592781786</created>
584
+ <option name="number" value="00077" />
585
+ <option name="presentableId" value="LOCAL-00077" />
586
+ <option name="project" value="LOCAL" />
587
+ <updated>1657592781786</updated>
588
+ </task>
589
+ <task id="LOCAL-00078" summary="键盘事件更新,delete可删除曲线标注点,双击可添加曲线标注点">
590
+ <created>1657607397044</created>
591
+ <option name="number" value="00078" />
592
+ <option name="presentableId" value="LOCAL-00078" />
593
+ <option name="project" value="LOCAL" />
594
+ <updated>1657607397044</updated>
595
+ </task>
596
+ <task id="LOCAL-00079" summary="2.20.0">
597
+ <created>1657607434015</created>
598
+ <option name="number" value="00079" />
599
+ <option name="presentableId" value="LOCAL-00079" />
600
+ <option name="project" value="LOCAL" />
601
+ <updated>1657607434015</updated>
602
+ </task>
603
+ <task id="LOCAL-00080" summary="2.2.0">
604
+ <created>1657607449348</created>
605
+ <option name="number" value="00080" />
606
+ <option name="presentableId" value="LOCAL-00080" />
607
+ <option name="project" value="LOCAL" />
608
+ <updated>1657607449348</updated>
609
+ </task>
610
+ <task id="LOCAL-00081" summary="加载速度优化">
611
+ <created>1657612318446</created>
612
+ <option name="number" value="00081" />
613
+ <option name="presentableId" value="LOCAL-00081" />
614
+ <option name="project" value="LOCAL" />
615
+ <updated>1657612318447</updated>
616
+ </task>
617
+ <task id="LOCAL-00082" summary="2.2.1">
618
+ <created>1657612343466</created>
619
+ <option name="number" value="00082" />
620
+ <option name="presentableId" value="LOCAL-00082" />
621
+ <option name="project" value="LOCAL" />
622
+ <updated>1657612343466</updated>
623
+ </task>
624
+ <task id="LOCAL-00083" summary="index.js">
625
+ <created>1657785699795</created>
626
+ <option name="number" value="00083" />
627
+ <option name="presentableId" value="LOCAL-00083" />
628
+ <option name="project" value="LOCAL" />
629
+ <updated>1657785699797</updated>
630
+ </task>
631
+ <task id="LOCAL-00084" summary="导航轨迹显示">
632
+ <created>1658394875542</created>
633
+ <option name="number" value="00084" />
634
+ <option name="presentableId" value="LOCAL-00084" />
635
+ <option name="project" value="LOCAL" />
636
+ <updated>1658394875543</updated>
637
+ </task>
638
+ <task id="LOCAL-00085" summary="刻度线显示">
639
+ <created>1658398987159</created>
640
+ <option name="number" value="00085" />
641
+ <option name="presentableId" value="LOCAL-00085" />
642
+ <option name="project" value="LOCAL" />
643
+ <updated>1658398987163</updated>
644
+ </task>
645
+ <option name="localTasksCounter" value="86" />
641
646
  <servers />
642
647
  </component>
643
648
  <component name="TypeScriptGeneratedFilesManager">
@@ -664,7 +669,7 @@
664
669
  <entry key="branch">
665
670
  <value>
666
671
  <list>
667
- <option value="origin/master" />
672
+ <option value="master" />
668
673
  </list>
669
674
  </value>
670
675
  </entry>
@@ -679,17 +684,6 @@
679
684
  <component name="VcsManagerConfiguration">
680
685
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
681
686
  <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
682
- <MESSAGE value="2.1.9" />
683
- <MESSAGE value="增加图像处理操作" />
684
- <MESSAGE value="2.1.10" />
685
- <MESSAGE value="2.1.11 截图优化" />
686
- <MESSAGE value="2.1.12 导出OpenSeadragon" />
687
- <MESSAGE value="重写绘制逻辑" />
688
- <MESSAGE value="package.json" />
689
- <MESSAGE value="组合框异常" />
690
- <MESSAGE value="2.1.14" />
691
- <MESSAGE value="闭合区域" />
692
- <MESSAGE value="2.1.15" />
693
687
  <MESSAGE value="闭合曲线" />
694
688
  <MESSAGE value="2.1.16" />
695
689
  <MESSAGE value="优化加载速度" />
@@ -704,7 +698,18 @@
704
698
  <MESSAGE value="优化点击操作" />
705
699
  <MESSAGE value="enableDbClickClose" />
706
700
  <MESSAGE value="2.1.20" />
707
- <option name="LAST_COMMIT_MESSAGE" value="2.1.20" />
701
+ <MESSAGE value="view.js" />
702
+ <MESSAGE value="优化选中点" />
703
+ <MESSAGE value="优化标注图形显示,一次最多绘制5000个点,超过的标注延迟加载" />
704
+ <MESSAGE value="键盘事件更新,delete可删除曲线标注点,双击可添加曲线标注点" />
705
+ <MESSAGE value="2.20.0" />
706
+ <MESSAGE value="2.2.0" />
707
+ <MESSAGE value="加载速度优化" />
708
+ <MESSAGE value="2.2.1" />
709
+ <MESSAGE value="index.js" />
710
+ <MESSAGE value="导航轨迹显示" />
711
+ <MESSAGE value="刻度线显示" />
712
+ <option name="LAST_COMMIT_MESSAGE" value="刻度线显示" />
708
713
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
709
714
  </component>
710
715
  <component name="XSLT-Support.FileAssociations.UIState">
package/example/index.js CHANGED
@@ -40,16 +40,20 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
40
40
  ROI: false,
41
41
  },
42
42
  graduation: {
43
- right: 30,
43
+ left: 30,
44
+ bottom: 10,
44
45
  },
45
46
  navigator: {
46
47
  disabled: false,
47
- height: 200,
48
48
  style: 'right: 0;top: 0',
49
49
  thumbnail: `/api/slide/getImage?file=${fileName}&type=thumbnail`,
50
- vestige: true,
50
+ scale: data.scanScale,
51
51
  vestigeZoom: .1,
52
52
  },
53
+ pxConversion: {
54
+ unit: 'um',
55
+ imageCapRes: data.imageCapRes,
56
+ },
53
57
  openSeadragonOptions: {
54
58
  maxZoomLevel: data.scanScale * 10,
55
59
  // imageLoaderLimit: 1,
@@ -182,6 +186,11 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
182
186
  /* kv.board.startDraw({
183
187
  tool: KfbView.marks.POLYGON,
184
188
  });*/
189
+ kv.viewer.addHandler('zoom', (res) => {
190
+ const zoom = kv.viewer.viewport.viewportToImageZoom(res.zoom) *
191
+ kv.$options.scale;
192
+ // console.log(zoom.toFixed(2) / 1);
193
+ });
185
194
  console.log(kv);
186
195
  let list = [];
187
196
  document.querySelector('#a').onchange = debounce(changeRange, 500);
@@ -290,7 +299,7 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
290
299
  // kv.board.endDraw();
291
300
  });
292
301
  kv.$on(KfbView.events.EVENT_DELETE_LABEL, (e) => {
293
- console.log(e.detail);
302
+ console.log('EVENT_DELETE_LABEL', e.detail);
294
303
  // kv.board.endDraw();
295
304
  });
296
305
  kv.$on(KfbView.events.EVENT_SELECT_LABEL, (e) => {
@@ -320,22 +329,25 @@ instance.get(`/slide/info?file=${fileName}`).then(({data}) => {
320
329
  setTimeout(() => {
321
330
  // kv.destroy();
322
331
  }, 6000);
323
- initLabels();
332
+
333
+ // initLabels();
324
334
 
325
335
  function initLabels() {
326
336
  const labels = [];
327
- for (let i = 0; i < 10000; i++) {
337
+ const colors = ['#027AFF', '#f56c6c'];
338
+ for (let i = 0; i < 50000; i++) {
328
339
  const point = {
329
- x: data.width / 2 + Math.random() * 10000,
330
- y: data.height / 2 + Math.random() * 10000,
340
+ x: Math.random() * data.width,
341
+ y: Math.random() * data.height,
331
342
  };
332
343
  const label = {
333
344
  // fillStyle: 'rgba(2, 122, 255, 1)',
334
345
  lineWidth: 6,
335
346
  points: [point, point],
336
347
  scale: 0.1,
337
- strokeStyle: '#027AFF',
348
+ strokeStyle: Math.random() > .5 ? colors[0] : colors[1],
338
349
  tool: 'Dot',
350
+ move: false,
339
351
  };
340
352
  labels.push(label);
341
353
  }