kfb-view 3.0.0-beta2 → 3.0.1

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.
@@ -43,10 +43,6 @@
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/plugin/openseadragon/openseadragon.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.js" afterDir="false" />
47
- <change beforePath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.js.map" afterDir="false" />
48
- <change beforePath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.min.js" afterDir="false" />
49
- <change beforePath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.min.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/src/plugin/openseadragon/openseadragon.min.js.map" afterDir="false" />
50
46
  </list>
51
47
  <option name="SHOW_DIALOG" value="false" />
52
48
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -82,24 +78,24 @@
82
78
  <option name="hideEmptyMiddlePackages" value="true" />
83
79
  <option name="showLibraryContents" value="true" />
84
80
  </component>
85
- <component name="PropertiesComponent"><![CDATA[{
86
- "keyToString": {
87
- "DefaultHtmlFileTemplate": "HTML File",
88
- "Project.color": "4c401d",
89
- "WebServerToolWindowFactoryState": "false",
90
- "dart.analysis.tool.window.visible": "false",
91
- "last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view/src/plugin/openseadragon",
92
- "node.js.detected.package.eslint": "true",
93
- "node.js.detected.package.tslint": "true",
94
- "node.js.selected.package.eslint": "(autodetect)",
95
- "node.js.selected.package.tslint": "(autodetect)",
96
- "nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
97
- "nodejs_package_manager_path": "npm",
98
- "settings.editor.selected.configurable": "settings.nodejs",
99
- "ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
100
- "vue.rearranger.settings.migration": "true"
81
+ <component name="PropertiesComponent">{
82
+ &quot;keyToString&quot;: {
83
+ &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
84
+ &quot;Project.color&quot;: &quot;4c401d&quot;,
85
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
86
+ &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
87
+ &quot;last_opened_file_path&quot;: &quot;/home/fanqifeng/WebstormProjects/kfb-view&quot;,
88
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
89
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
90
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
91
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
92
+ &quot;nodejs_interpreter_path&quot;: &quot;/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node&quot;,
93
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
94
+ &quot;settings.editor.selected.configurable&quot;: &quot;settings.nodejs&quot;,
95
+ &quot;ts.external.directory.path&quot;: &quot;/opt/WebStorm/plugins/javascript-impl/jsLanguageServicesImpl/external&quot;,
96
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
101
97
  }
102
- }]]></component>
98
+ }</component>
103
99
  <component name="RecentsManager">
104
100
  <key name="CopyFile.RECENT_KEYS">
105
101
  <recent name="$PROJECT_DIR$/src/plugin/openseadragon" />
@@ -180,8 +176,8 @@
180
176
  <recent_temporary>
181
177
  <list>
182
178
  <item itemvalue="npm.build:lib" />
183
- <item itemvalue="npm.server" />
184
179
  <item itemvalue="npm.server:hot" />
180
+ <item itemvalue="npm.server" />
185
181
  <item itemvalue="npm.clean:lib" />
186
182
  <item itemvalue="npm.build:prod" />
187
183
  </list>
@@ -397,27 +393,20 @@
397
393
  <workItem from="1675384282016" duration="594000" />
398
394
  <workItem from="1675385204348" duration="1462000" />
399
395
  <workItem from="1675843622628" duration="4524000" />
400
- </task>
401
- <task id="LOCAL-00071" summary="曲线绘制中,按删除键,删除上一个标注点">
402
- <created>1657538768786</created>
403
- <option name="number" value="00071" />
404
- <option name="presentableId" value="LOCAL-00071" />
405
- <option name="project" value="LOCAL" />
406
- <updated>1657538768786</updated>
407
- </task>
408
- <task id="LOCAL-00072" summary="优化点击操作">
409
- <created>1657539785588</created>
410
- <option name="number" value="00072" />
411
- <option name="presentableId" value="LOCAL-00072" />
412
- <option name="project" value="LOCAL" />
413
- <updated>1657539785589</updated>
414
- </task>
415
- <task id="LOCAL-00073" summary="enableDbClickClose">
416
- <created>1657539900044</created>
417
- <option name="number" value="00073" />
418
- <option name="presentableId" value="LOCAL-00073" />
419
- <option name="project" value="LOCAL" />
420
- <updated>1657539900044</updated>
396
+ <workItem from="1675848342418" duration="2364000" />
397
+ <workItem from="1675902452322" duration="1711000" />
398
+ <workItem from="1675909040416" duration="1850000" />
399
+ <workItem from="1675923421168" duration="14000" />
400
+ <workItem from="1676430334861" duration="2002000" />
401
+ <workItem from="1676507825692" duration="1801000" />
402
+ <workItem from="1676515560281" duration="597000" />
403
+ <workItem from="1676530835986" duration="1197000" />
404
+ <workItem from="1676621760411" duration="596000" />
405
+ <workItem from="1676679228746" duration="561000" />
406
+ <workItem from="1676680577748" duration="1197000" />
407
+ <workItem from="1676690227544" duration="597000" />
408
+ <workItem from="1676722969064" duration="565000" />
409
+ <workItem from="1678926296962" duration="2236000" />
421
410
  </task>
422
411
  <task id="LOCAL-00074" summary="2.1.20">
423
412
  <created>1657539914133</created>
@@ -741,7 +730,28 @@
741
730
  <option name="project" value="LOCAL" />
742
731
  <updated>1675327616880</updated>
743
732
  </task>
744
- <option name="localTasksCounter" value="120" />
733
+ <task id="LOCAL-00120" summary="升级openseadragon插件">
734
+ <created>1675919992646</created>
735
+ <option name="number" value="00120" />
736
+ <option name="presentableId" value="LOCAL-00120" />
737
+ <option name="project" value="LOCAL" />
738
+ <updated>1675919992646</updated>
739
+ </task>
740
+ <task id="LOCAL-00121" summary="feat:增加停止绘画事件">
741
+ <created>1678929016258</created>
742
+ <option name="number" value="00121" />
743
+ <option name="presentableId" value="LOCAL-00121" />
744
+ <option name="project" value="LOCAL" />
745
+ <updated>1678929016258</updated>
746
+ </task>
747
+ <task id="LOCAL-00122" summary="feat:截图生成的图片保留标注信息">
748
+ <created>1678929084617</created>
749
+ <option name="number" value="00122" />
750
+ <option name="presentableId" value="LOCAL-00122" />
751
+ <option name="project" value="LOCAL" />
752
+ <updated>1678929084617</updated>
753
+ </task>
754
+ <option name="localTasksCounter" value="123" />
745
755
  <servers />
746
756
  </component>
747
757
  <component name="TypeScriptGeneratedFilesManager">
@@ -784,9 +794,6 @@
784
794
  <component name="VcsManagerConfiguration">
785
795
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
786
796
  <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
787
- <MESSAGE value="2.2.8" />
788
- <MESSAGE value="优化标注信息显示" />
789
- <MESSAGE value="标注事件回调" />
790
797
  <MESSAGE value="defaultShow" />
791
798
  <MESSAGE value="2.2.9" />
792
799
  <MESSAGE value="矩形框的选中点变成线" />
@@ -809,7 +816,10 @@
809
816
  <MESSAGE value="截图区域范围数值保留2位小数" />
810
817
  <MESSAGE value="标注位置跳转增加参数,是否显示跳转动画" />
811
818
  <MESSAGE value="2.4.1" />
812
- <option name="LAST_COMMIT_MESSAGE" value="2.4.1" />
819
+ <MESSAGE value="升级openseadragon插件" />
820
+ <MESSAGE value="feat:增加停止绘画事件" />
821
+ <MESSAGE value="feat:截图生成的图片保留标注信息" />
822
+ <option name="LAST_COMMIT_MESSAGE" value="feat:截图生成的图片保留标注信息" />
813
823
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
814
824
  </component>
815
825
  <component name="XSLT-Support.FileAssociations.UIState">
@@ -66,8 +66,8 @@ 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.22',
70
+ // target: 'https://vai.hzztai.com',
71
71
  // target: 'https://tct.hzztai.com',
72
72
  // target: 'https://pis-ningbo.hzztai.com',
73
73
  // target: 'https://pis-test.hzztai.com',
package/example/index.js CHANGED
@@ -396,8 +396,16 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
396
396
  });
397
397
  const {width, height} = kv.$options;
398
398
  kv.$on(KfbView.events.EVENT_TAILORING_SCREENSHOT, (e) => {
399
- console.log(e.detail);
399
+ const blob = dataURLtoBlob(e.detail);
400
+ if (window.ClipboardItem && navigator?.clipboard) {
401
+ navigator.clipboard.write([
402
+ new window.ClipboardItem({
403
+ [blob.type]: blob,
404
+ }),
405
+ ]);
406
+ }
400
407
  });
408
+
401
409
  /* kv.tailoring.init(
402
410
  {
403
411
  left: width / 2 - 100,
@@ -450,6 +458,15 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
450
458
  document.querySelector('#g').value = 0;
451
459
  document.querySelector('#b').value = 0;
452
460
  kv.viewer.forceRedraw();
461
+ /* const { width, height } = kv.$options;
462
+ kv.tailoring.init(
463
+ {
464
+ left: width / 2 - 100,
465
+ top: height / 2 - 100,
466
+ height: 200,
467
+ width: 200,
468
+ color: '#ff0000',
469
+ });*/
453
470
  });
454
471
 
455
472
  /*
@@ -530,6 +547,18 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
530
547
  });*/
531
548
  });
532
549
 
550
+ function dataURLtoBlob(dataurl) {
551
+ const arr = dataurl.split(',');
552
+ const mime = arr[0].match(/:(.*?);/)[1];
553
+ const bstr = atob(arr[1]);
554
+ let n = bstr.length;
555
+ const u8arr = new Uint8Array(n);
556
+ while (n--) {
557
+ u8arr[n] = bstr.charCodeAt(n);
558
+ }
559
+ return new Blob([u8arr], {type: mime});
560
+ }
561
+
533
562
  /**
534
563
  * 解析参数,生成对应的请求参数字符串
535
564
  * @param {Object} data