allow scrolling with mousewheel
This commit is contained in:
parent
f532deb5ad
commit
692a1577d1
@ -147,6 +147,14 @@ class _DrawingPageState extends State<DrawingPage> {
|
||||
return Listener(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onPointerMove: (e) => _onPointerMove(e, canvasSize),
|
||||
onPointerSignal: (pointerSignal) {
|
||||
debugPrint('got pointer signal: $pointerSignal');
|
||||
|
||||
if (pointerSignal is PointerScrollEvent) {
|
||||
final delta = pointerSignal.scrollDelta;
|
||||
_calcNewPageOffset(-delta, size.width);
|
||||
}
|
||||
},
|
||||
onPointerDown: (d) {
|
||||
Offset pos = d.localPosition;
|
||||
final scale = calcPageDependentScale(zoom, a4Page, canvasSize);
|
||||
|
Loading…
Reference in New Issue
Block a user