@cornerstonejs/tools 4.20.2 → 4.20.3
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.
|
@@ -99,28 +99,36 @@ function _findSvgLayer(element) {
|
|
|
99
99
|
return internalDiv?.querySelector(':scope > .svg-layer') || null;
|
|
100
100
|
}
|
|
101
101
|
function _determineCorners(canvasPoints) {
|
|
102
|
-
const
|
|
103
|
-
|
|
102
|
+
const validPoints = canvasPoints.filter(Boolean);
|
|
103
|
+
const p0 = validPoints[0];
|
|
104
|
+
if (!p0 || validPoints.length < 2) {
|
|
104
105
|
return { left: p0, right: p0, top: p0, bottom: p0 };
|
|
105
106
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
let left = p0;
|
|
108
|
+
let right = p0;
|
|
109
|
+
let top = p0;
|
|
110
|
+
let bottom = p0;
|
|
111
|
+
for (let i = 1; i < validPoints.length; i++) {
|
|
112
|
+
const point = validPoints[i];
|
|
113
|
+
if (point[0] < left[0]) {
|
|
114
|
+
left = point;
|
|
115
|
+
}
|
|
116
|
+
if (point[0] > right[0]) {
|
|
117
|
+
right = point;
|
|
118
|
+
}
|
|
119
|
+
if (point[1] < top[1]) {
|
|
120
|
+
top = point;
|
|
121
|
+
}
|
|
122
|
+
if (point[1] > bottom[1]) {
|
|
123
|
+
bottom = point;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
112
126
|
return {
|
|
113
127
|
left,
|
|
114
128
|
top,
|
|
115
129
|
bottom,
|
|
116
130
|
right,
|
|
117
131
|
};
|
|
118
|
-
function _compareX(a, b) {
|
|
119
|
-
return a[0] < b[0] ? -1 : 1;
|
|
120
|
-
}
|
|
121
|
-
function _compareY(a, b) {
|
|
122
|
-
return a[1] < b[1] ? -1 : 1;
|
|
123
|
-
}
|
|
124
132
|
}
|
|
125
133
|
function _estimateTextBoxSize(textLines) {
|
|
126
134
|
const estimatedPadding = 25;
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.20.
|
|
1
|
+
export declare const version = "4.20.3";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.20.
|
|
1
|
+
export const version = '4.20.3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.3",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"canvas": "3.2.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@cornerstonejs/core": "4.20.
|
|
111
|
+
"@cornerstonejs/core": "4.20.3",
|
|
112
112
|
"@kitware/vtk.js": "34.15.1",
|
|
113
113
|
"@types/d3-array": "3.2.1",
|
|
114
114
|
"@types/d3-interpolate": "3.0.4",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"type": "individual",
|
|
128
128
|
"url": "https://ohif.org/donate"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "43df78bf93b86d67b0c546661d327d1d14ae13eb"
|
|
131
131
|
}
|