dwv 0.30.7 → 0.30.8
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/changelog.md +10 -0
- package/dist/dwv.js +14 -10
- package/dist/dwv.min.js +2 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.30.8](https://github.com/ivmartel/dwv/releases/tag/v0.30.8) - 03/01/2022
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Load state shape does not show on correct slice [#1078](https://github.com/ivmartel/dwv/issues/1078)
|
|
8
|
+
- TypeError: point.get is not a function when loading state [#1077](https://github.com/ivmartel/dwv/issues/1077)
|
|
9
|
+
- Uncaught TypeError: t.getX is not a function when saving state [#1072](https://github.com/ivmartel/dwv/issues/1072)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
3
13
|
## [v0.30.7](https://github.com/ivmartel/dwv/releases/tag/v0.30.7) - 28/12/2021
|
|
4
14
|
|
|
5
15
|
### Fixed
|
package/dist/dwv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! dwv 0.30.
|
|
1
|
+
/*! dwv 0.30.8 2022-01-04 12:43:27 */
|
|
2
2
|
// Inspired from umdjs
|
|
3
3
|
// See https://github.com/umdjs/umd/blob/master/templates/returnExports.js
|
|
4
4
|
(function (root, factory) {
|
|
@@ -718,7 +718,8 @@ dwv.App = function () {
|
|
|
718
718
|
drawings, drawingsDetails, fireEvent, this.addToUndoStack);
|
|
719
719
|
|
|
720
720
|
drawController.activateDrawLayer(
|
|
721
|
-
viewController.
|
|
721
|
+
viewController.getCurrentOrientedIndex(),
|
|
722
|
+
viewController.getScrollIndex());
|
|
722
723
|
};
|
|
723
724
|
/**
|
|
724
725
|
* Update a drawing from its details.
|
|
@@ -2680,12 +2681,17 @@ dwv.ctrl.ViewController = function (view) {
|
|
|
2680
2681
|
*
|
|
2681
2682
|
* @returns {dwv.math.Point} The position.
|
|
2682
2683
|
*/
|
|
2683
|
-
this.
|
|
2684
|
-
var res = view.
|
|
2684
|
+
this.getCurrentOrientedIndex = function () {
|
|
2685
|
+
var res = view.getCurrentIndex();
|
|
2685
2686
|
// values = orientation * orientedValues
|
|
2686
2687
|
// -> inv(orientation) * values = orientedValues
|
|
2687
2688
|
if (typeof view.getOrientation() !== 'undefined') {
|
|
2688
|
-
|
|
2689
|
+
var index3D = new dwv.math.Index(
|
|
2690
|
+
[res.get(0), res.get(1), res.get(2)]);
|
|
2691
|
+
var orientedIndex3D =
|
|
2692
|
+
view.getOrientation().getInverse().getAbs().multiplyIndex3D(index3D);
|
|
2693
|
+
var values = orientedIndex3D.getValues();
|
|
2694
|
+
res = new dwv.math.Index(values);
|
|
2689
2695
|
}
|
|
2690
2696
|
return res;
|
|
2691
2697
|
};
|
|
@@ -4444,7 +4450,7 @@ dwv.dicom = dwv.dicom || {};
|
|
|
4444
4450
|
* @returns {string} The version of the library.
|
|
4445
4451
|
*/
|
|
4446
4452
|
dwv.getVersion = function () {
|
|
4447
|
-
return '0.30.
|
|
4453
|
+
return '0.30.8';
|
|
4448
4454
|
};
|
|
4449
4455
|
|
|
4450
4456
|
/**
|
|
@@ -21033,7 +21039,7 @@ dwv.io.State = function () {
|
|
|
21033
21039
|
version: '0.5',
|
|
21034
21040
|
'window-center': viewController.getWindowLevel().center,
|
|
21035
21041
|
'window-width': viewController.getWindowLevel().width,
|
|
21036
|
-
position:
|
|
21042
|
+
position: position.getValues(),
|
|
21037
21043
|
scale: app.getAddedScale(),
|
|
21038
21044
|
offset: app.getOffset(),
|
|
21039
21045
|
drawings: drawLayer.getKonvaLayer().toObject(),
|
|
@@ -21078,9 +21084,7 @@ dwv.io.State = function () {
|
|
|
21078
21084
|
// display
|
|
21079
21085
|
viewController.setWindowLevel(
|
|
21080
21086
|
data['window-center'], data['window-width']);
|
|
21081
|
-
viewController.setCurrentPosition(
|
|
21082
|
-
new dwv.math.Point3D(
|
|
21083
|
-
data.position[0], data.position[1], data.position[2]), true);
|
|
21087
|
+
viewController.setCurrentPosition(new dwv.math.Point(data.position));
|
|
21084
21088
|
// apply saved scale on top of current base one
|
|
21085
21089
|
var baseScale = app.getActiveLayerGroup().getBaseScale();
|
|
21086
21090
|
var scale = null;
|