dwv 0.26.1 → 0.26.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.
- package/dist/dwv.js +7 -35
- package/dist/dwv.min.js +2 -2
- package/package.json +1 -1
package/dist/dwv.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! dwv 0.26.
|
|
1
|
+
/*! dwv 0.26.3 2023-02-17 14:34:25 */
|
|
2
2
|
// Inspired from umdjs
|
|
3
3
|
// See https://github.com/umdjs/umd/blob/master/templates/returnExports.js
|
|
4
4
|
(function (root, factory) {
|
|
@@ -2720,9 +2720,7 @@ dwv.ToolboxController = function ()
|
|
|
2720
2720
|
canvas.addEventListener("mousemove", onMouch);
|
|
2721
2721
|
canvas.addEventListener("mouseup", onMouch);
|
|
2722
2722
|
canvas.addEventListener("mouseout", onMouch);
|
|
2723
|
-
canvas.addEventListener("mousewheel", onMouch);
|
|
2724
2723
|
canvas.addEventListener("wheel", onMouch);
|
|
2725
|
-
canvas.addEventListener("DOMMouseScroll", onMouch);
|
|
2726
2724
|
canvas.addEventListener("dblclick", onMouch);
|
|
2727
2725
|
// touch listeners
|
|
2728
2726
|
canvas.addEventListener("touchstart", onMouch);
|
|
@@ -2743,8 +2741,7 @@ dwv.ToolboxController = function ()
|
|
|
2743
2741
|
canvas.removeEventListener("mousemove", onMouch);
|
|
2744
2742
|
canvas.removeEventListener("mouseup", onMouch);
|
|
2745
2743
|
canvas.removeEventListener("mouseout", onMouch);
|
|
2746
|
-
canvas.removeEventListener("
|
|
2747
|
-
canvas.removeEventListener("DOMMouseScroll", onMouch);
|
|
2744
|
+
canvas.removeEventListener("wheel", onMouch);
|
|
2748
2745
|
canvas.removeEventListener("dblclick", onMouch);
|
|
2749
2746
|
// touch listeners
|
|
2750
2747
|
canvas.removeEventListener("touchstart", onMouch);
|
|
@@ -2793,9 +2790,8 @@ dwv.ToolboxController = function ()
|
|
|
2793
2790
|
event.type === "mousedown" ||
|
|
2794
2791
|
event.type === "mouseup" ||
|
|
2795
2792
|
event.type === "mouseout" ||
|
|
2796
|
-
event.type === "
|
|
2797
|
-
event.type === "dblclick"
|
|
2798
|
-
event.type === "DOMMouseScroll" )
|
|
2793
|
+
event.type === "wheel" ||
|
|
2794
|
+
event.type === "dblclick" )
|
|
2799
2795
|
{
|
|
2800
2796
|
offsets = dwv.html.getEventOffset(event);
|
|
2801
2797
|
event._xs = offsets[0].x;
|
|
@@ -3633,7 +3629,7 @@ dwv.dicom = dwv.dicom || {};
|
|
|
3633
3629
|
* Get the version of the library.
|
|
3634
3630
|
* @return {String} The version of the library.
|
|
3635
3631
|
*/
|
|
3636
|
-
dwv.getVersion = function () { return "0.26.
|
|
3632
|
+
dwv.getVersion = function () { return "0.26.3"; };
|
|
3637
3633
|
|
|
3638
3634
|
/**
|
|
3639
3635
|
* Clean string: trim and remove ending.
|
|
@@ -24766,19 +24762,6 @@ dwv.tool.Scroll = function(app)
|
|
|
24766
24762
|
self.mouseup(event);
|
|
24767
24763
|
};
|
|
24768
24764
|
|
|
24769
|
-
/**
|
|
24770
|
-
* Handle mouse scroll event (fired by Firefox).
|
|
24771
|
-
* @param {Object} event The mouse scroll event.
|
|
24772
|
-
*/
|
|
24773
|
-
this.DOMMouseScroll = function (event) {
|
|
24774
|
-
// ev.detail on firefox is 3
|
|
24775
|
-
if ( event.detail < 0 ) {
|
|
24776
|
-
mouseScroll(true);
|
|
24777
|
-
} else {
|
|
24778
|
-
mouseScroll(false);
|
|
24779
|
-
}
|
|
24780
|
-
};
|
|
24781
|
-
|
|
24782
24765
|
/**
|
|
24783
24766
|
* Handle mouse wheel event.
|
|
24784
24767
|
* @param {Object} event The mouse wheel event.
|
|
@@ -25514,23 +25497,12 @@ dwv.tool.ZoomAndPan = function(app)
|
|
|
25514
25497
|
self.mouseup(event);
|
|
25515
25498
|
};
|
|
25516
25499
|
|
|
25517
|
-
/**
|
|
25518
|
-
* Handle mouse scroll event (fired by Firefox).
|
|
25519
|
-
* @param {Object} event The mouse scroll event.
|
|
25520
|
-
*/
|
|
25521
|
-
this.DOMMouseScroll = function(event){
|
|
25522
|
-
// ev.detail on firefox is 3
|
|
25523
|
-
var step = - event.detail / 30;
|
|
25524
|
-
app.stepZoom(step, event._xs, event._ys);
|
|
25525
|
-
};
|
|
25526
|
-
|
|
25527
25500
|
/**
|
|
25528
25501
|
* Handle mouse wheel event.
|
|
25529
25502
|
* @param {Object} event The mouse wheel event.
|
|
25530
25503
|
*/
|
|
25531
|
-
this.
|
|
25532
|
-
|
|
25533
|
-
var step = event.wheelDelta / 1200;
|
|
25504
|
+
this.wheel = function(event){
|
|
25505
|
+
var step = -event.deltaY / 500;
|
|
25534
25506
|
app.stepZoom(step, event._xs, event._ys);
|
|
25535
25507
|
};
|
|
25536
25508
|
|