Skip to content

Commit 95ec79b

Browse files
authored
Merge pull request #314 from LinkunGao/fix/v2.2.3
Fix/v2.2.3
2 parents a1e4db5 + b008bc3 commit 95ec79b

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "copper3d",
33
"description": "A 3d visualisation package base on threejs provides multiple scenes and Nrrd image load funtion.",
4-
"version": "2.2.2",
4+
"version": "2.2.3",
55
"main": "dist/bundle.umd.js",
66
"moudle": "dist/bundle.esm.js",
77
"types": "dist/types/index.d.ts",

src/Utils/segmentation/DrawToolCore.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ export class DrawToolCore extends CommToolsData {
970970
}
971971
// drawing canvas mouse zoom wheel
972972
configMouseZoomWheel() {
973+
973974
let moveDistance = 1;
974975
const handleMouseZoomSliceWheelMove = (e: WheelEvent) => {
975976
if (this.protectedData.Is_Shift_Pressed) {
@@ -1007,18 +1008,19 @@ export class DrawToolCore extends CommToolsData {
10071008
);
10081009

10091010
moveDistance = w / this.nrrd_states.originWidth;
1010-
1011-
1011+
10121012
if (moveDistance > 8) {
10131013
moveDistance = 8;
1014-
this.resetPaintAreaUIPosition();
1014+
// this.resetPaintAreaUIPosition();
10151015
} else if (moveDistance < 1) {
10161016
moveDistance = 1;
10171017
this.resetPaintAreaUIPosition();
1018+
this.resizePaintArea(moveDistance);
10181019
} else {
10191020
this.resetPaintAreaUIPosition(l, t);
1021+
this.resizePaintArea(moveDistance);
10201022
}
1021-
this.resizePaintArea(moveDistance);
1023+
10221024
this.setIsDrawFalse(1000);
10231025
this.nrrd_states.sizeFoctor = moveDistance;
10241026
};

src/Utils/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ export function switchPencilIcon(icon: string, urls?: string[]) {
123123

124124
export function switchEraserSize(size: number, urls?: string[]) {
125125
let url = "";
126+
126127
if (!!urls && urls.length > 0) {
128+
127129
if (size <= 3) {
128130
url = `url(${urls[0]}) 3 3, crosshair`;
129131
} else if (3 < size && size <= 8) {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ import { IPaintImage, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates}
4444

4545
import "./css/style.css";
4646

47-
export const REVISION = "v2.2.2";
47+
export const REVISION = "v2.2.3";
4848

4949
console.log(
50-
"%cCopper3D Visualisation %cBeta:v2.2.2",
50+
`%cCopper3D Visualisation %cBeta:${REVISION}`,
5151
"padding: 3px;color:white; background:#023047",
5252
"padding: 3px;color:white; background:#f50a25"
5353
);

0 commit comments

Comments
 (0)