diff --git a/labelme/widgets/canvas.py b/labelme/widgets/canvas.py index b78a5fd2a..bcdb50466 100644 --- a/labelme/widgets/canvas.py +++ b/labelme/widgets/canvas.py @@ -1,4 +1,5 @@ import imgviz +import platform from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets @@ -920,6 +921,10 @@ def wheelEvent(self, ev): # with Ctrl/Command key # zoom self.zoomRequest.emit(delta.y(), ev.pos()) + elif QtCore.Qt.ShiftModifier == int(mods) and platform.system() != "Darwin": + # side scroll + self.scrollRequest.emit(delta.y(), QtCore.Qt.Horizontal) + self.scrollRequest.emit(delta.x(), QtCore.Qt.Vertical) else: # scroll self.scrollRequest.emit(delta.x(), QtCore.Qt.Horizontal)