Skip to content

Commit

Permalink
Add mouse wheel for multi frame, fixes #1316
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Feb 28, 2023
1 parent 8124ca4 commit 074e1f4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/tools/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,19 @@ dwv.tool.Scroll = function (app) {
var layerGroup = app.getLayerGroupByDivId(layerDetails.groupDivId);
var viewController =
layerGroup.getActiveViewLayer().getViewController();
if (up) {
viewController.incrementScrollIndex();
} else {
viewController.decrementScrollIndex();
var imageSize = viewController.getImageSize();
if (imageSize.canScroll3D()) {
if (up) {
viewController.incrementScrollIndex();
} else {
viewController.decrementScrollIndex();
}
} else if (imageSize.moreThanOne(3)) {
if (up) {
viewController.incrementIndex(3);
} else {
viewController.decrementIndex(3);
}
}
};

Expand Down

0 comments on commit 074e1f4

Please sign in to comment.