react-image-annotate-master-custom 0.0.28 → 0.0.32
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/RegionShapes/index.js +15 -4
- package/RegionTags/index.js +1 -14
- package/index.js +13 -3
- package/package.json +8 -5
package/RegionShapes/index.js
CHANGED
|
@@ -13,8 +13,9 @@ var RegionComponents = {
|
|
|
13
13
|
iw = _ref.iw,
|
|
14
14
|
ih = _ref.ih;
|
|
15
15
|
return React.createElement("g", {
|
|
16
|
-
transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
|
|
16
|
+
transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ") scale(1.5)")
|
|
17
17
|
}, React.createElement("path", {
|
|
18
|
+
id: "marker-path-".concat(region.id),
|
|
18
19
|
d: "M 1.866 12.7018 c2.293,-2.759 7.374,-9.452 7.374,-13.202c0,-4.554 -3.766,-8.238 -8.413,-8.238c-4.646,0 -8.413,3.684 -8.413,8.238c0,3.75 5.124,10.443 7.374,13.202c0.539,0.656 1.538,0.656 2.077,0Zm-1.038,-15.957c1.537,0 2.803,1.241 2.803,2.746c0,1.505 -1.266,2.746 -2.803,2.746c-0.006,0 -0.014,0 -0.019,0c-1.537,0 -2.803,-1.241 -2.803,-2.746c0,-1.505 1.266,-2.746 2.803,-2.746c0.006,0 0.014,0 0.019,0Z",
|
|
19
20
|
style: {
|
|
20
21
|
position: "absolute",
|
|
@@ -30,9 +31,20 @@ var RegionComponents = {
|
|
|
30
31
|
cy: "-0.5",
|
|
31
32
|
r: "5.817",
|
|
32
33
|
style: {
|
|
33
|
-
fill:
|
|
34
|
+
fill: (region === null || region === void 0 ? void 0 : region.hideColor) || (region === null || region === void 0 ? void 0 : region.isNew) ? colorAlpha("#E45B21", 1) : colorAlpha((region === null || region === void 0 ? void 0 : region.severityColor) || "#FFF", 1)
|
|
34
35
|
}
|
|
35
|
-
})
|
|
36
|
+
}), React.createElement("text", {
|
|
37
|
+
x: "0.8",
|
|
38
|
+
y: "1",
|
|
39
|
+
textAnchor: "middle",
|
|
40
|
+
dominantBaseline: "middle",
|
|
41
|
+
fill: "#111111",
|
|
42
|
+
fontSize: "7",
|
|
43
|
+
fontWeight: "600",
|
|
44
|
+
style: {
|
|
45
|
+
pointerEvents: "none"
|
|
46
|
+
}
|
|
47
|
+
}, (region === null || region === void 0 ? void 0 : region.sid) || ""));
|
|
36
48
|
}),
|
|
37
49
|
line: memo(function (_ref2) {
|
|
38
50
|
var region = _ref2.region,
|
|
@@ -238,7 +250,6 @@ export var WrappedRegionList = memo(function (_ref19) {
|
|
|
238
250
|
iw = _ref19.iw,
|
|
239
251
|
ih = _ref19.ih,
|
|
240
252
|
fullSegmentationMode = _ref19.fullSegmentationMode;
|
|
241
|
-
console.log("🚀 ~ regions:", regions);
|
|
242
253
|
return regions.filter(function (r) {
|
|
243
254
|
return r.visible !== false;
|
|
244
255
|
}).map(function (r) {
|
package/RegionTags/index.js
CHANGED
|
@@ -114,20 +114,7 @@ export var RegionTags = function RegionTags(_ref) {
|
|
|
114
114
|
} : {
|
|
115
115
|
top: 0
|
|
116
116
|
})
|
|
117
|
-
}, !region.editingLabels ? copyWithout(mouseEvents, "onMouseDown", "onMouseUp") : {})
|
|
118
|
-
allowedClasses: regionClsList,
|
|
119
|
-
allowedTags: regionTagList,
|
|
120
|
-
onOpen: onBeginRegionEdit,
|
|
121
|
-
onChange: onChangeRegion,
|
|
122
|
-
onClose: onCloseRegionEdit,
|
|
123
|
-
onDelete: onDeleteRegion,
|
|
124
|
-
editing: region.editingLabels,
|
|
125
|
-
region: region,
|
|
126
|
-
regions: regions,
|
|
127
|
-
imageSrc: imageSrc,
|
|
128
|
-
onRegionClassAdded: onRegionClassAdded,
|
|
129
|
-
allowComments: allowComments
|
|
130
|
-
})));
|
|
117
|
+
}, !region.editingLabels ? copyWithout(mouseEvents, "onMouseDown", "onMouseUp") : {})));
|
|
131
118
|
});
|
|
132
119
|
};
|
|
133
120
|
export default RegionTags;
|
package/index.js
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
import Theme from "./Theme";
|
|
4
|
+
import DemoSite from "./DemoSite";
|
|
5
|
+
import LandingPage from "./LandingPage";
|
|
6
|
+
import "./site.css";
|
|
7
|
+
|
|
8
|
+
var Site = function Site() {
|
|
9
|
+
var path = window.location.pathname.replace(/\/$/, "").split("/").slice(-1)[0];
|
|
10
|
+
return React.createElement(Theme, null, path === "demo" ? React.createElement(DemoSite, null) : React.createElement(LandingPage, null));
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
ReactDOM.render(React.createElement(Site, null), document.getElementById("root"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-image-annotate-master-custom",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@fortawesome/fontawesome-svg-core": "^1.2.12",
|
|
6
6
|
"@fortawesome/free-solid-svg-icons": "^5.6.3",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"test": "react-scripts test",
|
|
52
52
|
"eject": "react-scripts eject",
|
|
53
53
|
"storybook": "start-storybook -p 9090 -s public",
|
|
54
|
-
"build": "npm run build:babel &&
|
|
54
|
+
"build": "npm run build:babel && copyfiles -f package.json README.md dist",
|
|
55
|
+
"build:babel": "rimraf dist && cross-env NODE_ENV=production babel ./src --ignore \"src/**/*.story.js\" --out-dir=./dist",
|
|
55
56
|
"dist": "npm run build && cd dist && npm publish",
|
|
56
|
-
"build:babel": "NODE_ENV=production babel ./src --ignore \"src/**/*.story.js\" --out-dir=./dist && rm dist/index.js && cp dist/lib.js dist/index.js",
|
|
57
57
|
"build-storybook": "build-storybook",
|
|
58
|
-
"build:gh-pages": "CI=false react-scripts build &&
|
|
58
|
+
"build:gh-pages": "CI=false react-scripts build && mkdirp build/demo && copyfiles -f build/index.html build/demo",
|
|
59
59
|
"gh-pages": "npm run build:gh-pages && gh-pages -d build",
|
|
60
60
|
"prettier": "prettier --write \"src/**/*.js\"",
|
|
61
61
|
"prettier:test": "prettier --check \"src/**/*.js\""
|
|
@@ -79,11 +79,14 @@
|
|
|
79
79
|
"@storybook/react": "^5.3.14",
|
|
80
80
|
"babel-loader": "^8.0.5",
|
|
81
81
|
"babel-preset-react-app": "^7.0.0",
|
|
82
|
+
"copyfiles": "2",
|
|
83
|
+
"cross-env": "7",
|
|
82
84
|
"gh-pages": "^2.0.1",
|
|
83
85
|
"prettier": "^2.5.1",
|
|
84
86
|
"raw.macro": "^0.3.0",
|
|
85
87
|
"react-github-btn": "^1.1.1",
|
|
86
|
-
"react-scripts": "^3.4.1"
|
|
88
|
+
"react-scripts": "^3.4.1",
|
|
89
|
+
"rimraf": "3"
|
|
87
90
|
},
|
|
88
91
|
"prettier": {
|
|
89
92
|
"semi": false
|