dwv 0.26.2 → 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 +5 -22
- 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,9 +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("mousewheel", onMouch);
|
|
2747
2744
|
canvas.removeEventListener("wheel", onMouch);
|
|
2748
|
-
canvas.removeEventListener("DOMMouseScroll", onMouch);
|
|
2749
2745
|
canvas.removeEventListener("dblclick", onMouch);
|
|
2750
2746
|
// touch listeners
|
|
2751
2747
|
canvas.removeEventListener("touchstart", onMouch);
|
|
@@ -2794,10 +2790,8 @@ dwv.ToolboxController = function ()
|
|
|
2794
2790
|
event.type === "mousedown" ||
|
|
2795
2791
|
event.type === "mouseup" ||
|
|
2796
2792
|
event.type === "mouseout" ||
|
|
2797
|
-
event.type === "mousewheel" ||
|
|
2798
2793
|
event.type === "wheel" ||
|
|
2799
|
-
event.type === "dblclick"
|
|
2800
|
-
event.type === "DOMMouseScroll" )
|
|
2794
|
+
event.type === "dblclick" )
|
|
2801
2795
|
{
|
|
2802
2796
|
offsets = dwv.html.getEventOffset(event);
|
|
2803
2797
|
event._xs = offsets[0].x;
|
|
@@ -3635,7 +3629,7 @@ dwv.dicom = dwv.dicom || {};
|
|
|
3635
3629
|
* Get the version of the library.
|
|
3636
3630
|
* @return {String} The version of the library.
|
|
3637
3631
|
*/
|
|
3638
|
-
dwv.getVersion = function () { return "0.26.
|
|
3632
|
+
dwv.getVersion = function () { return "0.26.3"; };
|
|
3639
3633
|
|
|
3640
3634
|
/**
|
|
3641
3635
|
* Clean string: trim and remove ending.
|
|
@@ -25503,23 +25497,12 @@ dwv.tool.ZoomAndPan = function(app)
|
|
|
25503
25497
|
self.mouseup(event);
|
|
25504
25498
|
};
|
|
25505
25499
|
|
|
25506
|
-
/**
|
|
25507
|
-
* Handle mouse scroll event (fired by Firefox).
|
|
25508
|
-
* @param {Object} event The mouse scroll event.
|
|
25509
|
-
*/
|
|
25510
|
-
this.DOMMouseScroll = function(event){
|
|
25511
|
-
// ev.detail on firefox is 3
|
|
25512
|
-
var step = - event.detail / 30;
|
|
25513
|
-
app.stepZoom(step, event._xs, event._ys);
|
|
25514
|
-
};
|
|
25515
|
-
|
|
25516
25500
|
/**
|
|
25517
25501
|
* Handle mouse wheel event.
|
|
25518
25502
|
* @param {Object} event The mouse wheel event.
|
|
25519
25503
|
*/
|
|
25520
|
-
this.
|
|
25521
|
-
|
|
25522
|
-
var step = event.wheelDelta / 1200;
|
|
25504
|
+
this.wheel = function(event){
|
|
25505
|
+
var step = -event.deltaY / 500;
|
|
25523
25506
|
app.stepZoom(step, event._xs, event._ys);
|
|
25524
25507
|
};
|
|
25525
25508
|
|