@itk-viewer/viewer
Advanced tools
Comparing version 0.5.0 to 0.5.1
# @itk-viewer/viewer | ||
## 0.5.1 | ||
### Patch Changes | ||
- Updated dependencies [0871fbb] | ||
- @itk-viewer/io@0.4.0 | ||
## 0.5.0 | ||
@@ -4,0 +11,0 @@ |
@@ -45,2 +45,3 @@ import { Actor, AnyActorLogic, AnyActorRef } from 'xstate'; | ||
}> | undefined; | ||
autoCameraReset: boolean; | ||
}, CreateChild | { | ||
@@ -98,2 +99,5 @@ type: 'setImage'; | ||
}>; | ||
} | { | ||
type: 'setAutoCameraReset'; | ||
enableReset: boolean; | ||
}, { | ||
@@ -177,2 +181,5 @@ [x: string]: import("xstate").ActorRef<import("xstate").PromiseSnapshot<BuiltImage, { | ||
}>; | ||
} | { | ||
type: 'setAutoCameraReset'; | ||
enableReset: boolean; | ||
}, { | ||
@@ -179,0 +186,0 @@ src: "imageBuilder"; |
@@ -9,2 +9,3 @@ import { assign, enqueueActions, fromPromise, setup, } from 'xstate'; | ||
camera: undefined, | ||
autoCameraReset: true, | ||
}; | ||
@@ -25,4 +26,4 @@ export const view3d = setup({ | ||
}, | ||
resetCameraPose: async ({ context: { image, camera, viewport } }) => { | ||
if (!image || !camera) | ||
resetCameraPose: async ({ context: { image, camera, viewport, autoCameraReset }, }) => { | ||
if (!image || !camera || !autoCameraReset) | ||
return; | ||
@@ -118,2 +119,9 @@ const aspect = (() => { | ||
}, | ||
setAutoCameraReset: { | ||
actions: [ | ||
assign({ | ||
autoCameraReset: ({ event: { enableReset } }) => enableReset, | ||
}), | ||
], | ||
}, | ||
}, | ||
@@ -120,0 +128,0 @@ initial: 'idle', |
{ | ||
"name": "@itk-viewer/viewer", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Multi-dimensional web-based image, mesh, and point set viewer", | ||
@@ -46,4 +46,4 @@ "type": "module", | ||
"xstate": "5.5.2", | ||
"@itk-viewer/utils": "^0.1.3", | ||
"@itk-viewer/io": "^0.3.0" | ||
"@itk-viewer/io": "^0.4.0", | ||
"@itk-viewer/utils": "^0.1.3" | ||
}, | ||
@@ -50,0 +50,0 @@ "scripts": { |
@@ -24,2 +24,3 @@ import { | ||
camera: undefined as Camera | undefined, | ||
autoCameraReset: true, | ||
}; | ||
@@ -37,2 +38,3 @@ | ||
| { type: 'setCamera'; camera: Camera } | ||
| { type: 'setAutoCameraReset'; enableReset: boolean } | ||
| CreateChild; | ||
@@ -61,4 +63,6 @@ }, | ||
}, | ||
resetCameraPose: async ({ context: { image, camera, viewport } }) => { | ||
if (!image || !camera) return; | ||
resetCameraPose: async ({ | ||
context: { image, camera, viewport, autoCameraReset }, | ||
}) => { | ||
if (!image || !camera || !autoCameraReset) return; | ||
const aspect = (() => { | ||
@@ -156,2 +160,9 @@ if (!viewport) return 1; | ||
}, | ||
setAutoCameraReset: { | ||
actions: [ | ||
assign({ | ||
autoCameraReset: ({ event: { enableReset } }) => enableReset, | ||
}), | ||
], | ||
}, | ||
}, | ||
@@ -158,0 +169,0 @@ initial: 'idle', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188518
3302
+ Added@itk-viewer/blosc-zarr@0.2.3(transitive)
+ Added@itk-viewer/io@0.4.3(transitive)
- Removed@itk-viewer/blosc-zarr@0.1.3(transitive)
- Removed@itk-viewer/io@0.3.0(transitive)
Updated@itk-viewer/io@^0.4.0