kfb-view 3.3.0 → 3.3.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.
@@ -0,0 +1,9 @@
1
+ //! Built on 2024-04-01
2
+
3
+ //! Git commit: v4.1.1-1-f90d9814
4
+
5
+ //! License: http://openseadragon.github.io/license/
6
+
7
+ //! http://openseadragon.github.io
8
+
9
+ //! openseadragon 4.1.1
package/package.json CHANGED
@@ -1,20 +1,23 @@
1
1
  {
2
2
  "name": "kfb-view",
3
3
  "description": "一个在线kfb的阅片软件",
4
- "version": "3.3.0",
4
+ "version": "3.3.1",
5
5
  "author": "qifeng.fan <qifeng.fan@hzztai.com>",
6
6
  "license": "MIT",
7
- "main": "lib/kfb-view.js",
7
+ "main": "lib/kfb-view.cjs.js",
8
+ "module": "lib/kfb-view.es.js",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./lib/kfb-view.es.js",
12
+ "require": "./lib/kfb-view.cjs.js"
13
+ }
14
+ },
8
15
  "scripts": {
9
- "build:dev": "npm run clean:dist && npm run webpack -- --mode development --config config/webpack.dev.conf.js --progress --profile",
10
- "build:prod": "npm run clean:dist && npm run webpack -- --mode production --config config/webpack.prod.conf.js --progress --profile --bail",
11
16
  "build:lib": "npm run clean:lib && npm run webpack -- --mode production --config config/webpack.lib.conf.js --progress --profile --bail",
12
- "build": "npm run build:prod",
13
- "clean:dist": "npm run rimraf -- dist",
17
+ "build": "npm run build:lib",
14
18
  "clean:lib": "npm run rimraf -- lib",
15
19
  "rimraf": "rimraf",
16
- "server:hot": "npm run webpack-dev-server -- --mode development --config config/webpack.dev.conf.js --hot --progress --profile --watch",
17
- "server:dev": "npm run webpack-dev-server -- --mode development --config config/webpack.dev.conf.js --progress --profile --wascreenshottch",
20
+ "server:dev": "npm run webpack-dev-server -- --mode development --config config/webpack.dev.conf.js --hot --progress --profile",
18
21
  "server": "npm run server:dev",
19
22
  "start": "npm run build",
20
23
  "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
@@ -25,7 +28,6 @@
25
28
  "mitt": "^3.0.1"
26
29
  },
27
30
  "devDependencies": {
28
- "axios": "^1.6.5",
29
31
  "@babel/core": "^7.0.0",
30
32
  "@babel/plugin-proposal-class-properties": "^7.0.0",
31
33
  "@babel/plugin-proposal-decorators": "^7.0.0",
@@ -43,37 +45,31 @@
43
45
  "@babel/plugin-syntax-dynamic-import": "^7.0.0",
44
46
  "@babel/plugin-syntax-import-meta": "^7.0.0",
45
47
  "@babel/preset-env": "^7.0.0",
46
- "@purtuga/esm-webpack-plugin": "^1.5.0",
47
48
  "autoprefixer": "^8.6.4",
48
- "babel-eslint": "^9.0.0",
49
- "babel-loader": "^8.0.0",
50
- "compression-webpack-plugin": "^1.1.11",
49
+ "axios": "^1.6.5",
50
+ "babel-eslint": "^10.1.0",
51
+ "babel-loader": "^10.0.0",
51
52
  "copy-webpack-plugin": "^4.5.2",
52
53
  "core-js": "^3.6.5",
53
- "css-loader": "^0.28.11",
54
+ "css-loader": "^7.1.2",
54
55
  "eslint": "^5.0.1",
55
56
  "eslint-config-google": "^0.9.1",
56
57
  "eslint-friendly-formatter": "^4.0.1",
57
- "eslint-loader": "^2.0.0",
58
58
  "eslint-plugin-html": "^4.0.5",
59
- "file-loader": "^1.1.11",
60
- "html-loader": "^0.5.5",
61
- "html-webpack-plugin": "^3.2.0",
62
- "mini-css-extract-plugin": "^0.4.1",
63
- "node-sass": "^4.9.0",
64
- "postcss-import": "^11.1.0",
65
- "postcss-loader": "^2.1.5",
59
+ "html-loader": "^5.1.0",
60
+ "html-webpack-plugin": "^5.6.3",
61
+ "mini-css-extract-plugin": "^2.9.2",
62
+ "sass": "^1.89.1",
63
+ "postcss-import": "^16.1.1",
64
+ "postcss-loader": "^8.1.1",
66
65
  "rimraf": "^2.6.2",
67
- "sass-loader": "^7.0.3",
68
- "script-ext-html-webpack-plugin": "^2.0.1",
69
- "style-loader": "^0.21.0",
66
+ "sass-loader": "^16.0.5",
67
+ "style-loader": "^4.0.0",
70
68
  "terser-webpack-plugin": "^4.2.2",
71
- "url-loader": "^1.0.1",
72
- "webpack": "^4.14.0",
73
- "webpack-cli": "^3.0.8",
74
- "webpack-dev-server": "^3.1.4",
75
- "webpack-merge": "^4.1.3",
76
- "worker-loader": "^2.0.0"
69
+ "webpack": "^5.100.1",
70
+ "webpack-cli": "^6.0.1",
71
+ "webpack-dev-server": "^5.2.2",
72
+ "webpack-merge": "^6.0.1"
77
73
  },
78
74
  "engines": {
79
75
  "node": ">= 6.11.5",
@@ -1,4 +1,4 @@
1
- import {DOT, FLAG, STAR} from '../const/mark';
1
+ import {DOT, FLAG, IMAGE, STAR} from '../const/mark';
2
2
 
3
3
  export class LabelModel {
4
4
  constructor(data = {}) {
@@ -28,9 +28,10 @@ export class LabelModel {
28
28
  this.custom = data.custom ?? false; // 是否是自定义的标注
29
29
  this.select = data.select ?? false; // 是否是选中状态
30
30
  this.show = data.show ?? true; // 是否显示
31
+ this.subType = data.subType; // 自定义类型
31
32
  this.__other__ = data.__other__ || {}; // 其他信息
32
33
  this.__data__ = data.__data__ ?? data; // 记录原始数据
33
- if (this.src) {
34
+ if (this.src && this.tool === IMAGE) {
34
35
  this.img = new Image();
35
36
  this.img.src = this.src;
36
37
  this.imgLoadSuccess = false;