mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -268,6 +268,14 @@ class InputModel {
|
||||
sendMouse('up', button);
|
||||
}
|
||||
|
||||
void tapDown(MouseButtons button) {
|
||||
sendMouse('down', button);
|
||||
}
|
||||
|
||||
void tapUp(MouseButtons button) {
|
||||
sendMouse('up', button);
|
||||
}
|
||||
|
||||
/// Send scroll event with scroll distance [y].
|
||||
void scroll(int y) {
|
||||
bind.sessionSendMouse(
|
||||
@@ -429,7 +437,7 @@ class InputModel {
|
||||
}
|
||||
|
||||
void onPointDownImage(PointerDownEvent e) {
|
||||
debugPrint("onPointDownImage");
|
||||
debugPrint("onPointDownImage ${e.kind}");
|
||||
_stopFling = true;
|
||||
if (e.kind != ui.PointerDeviceKind.mouse) {
|
||||
if (isPhysicalMouse.value) {
|
||||
@@ -469,6 +477,7 @@ class InputModel {
|
||||
} else if (dy < 0) {
|
||||
dy = 1;
|
||||
}
|
||||
debugPrint('REMOVE ME ================== onPointerSignalImage');
|
||||
bind.sessionSendMouse(
|
||||
sessionId: sessionId,
|
||||
msg: '{"type": "wheel", "x": "$dx", "y": "$dy"}');
|
||||
|
||||
@@ -1265,7 +1265,6 @@ class CursorModel with ChangeNotifier {
|
||||
}
|
||||
|
||||
updatePan(double dx, double dy, bool touchMode) {
|
||||
if (parent.target?.imageModel.image == null) return;
|
||||
if (touchMode) {
|
||||
final scale = parent.target?.canvasModel.scale ?? 1.0;
|
||||
_x += dx / scale;
|
||||
@@ -1274,6 +1273,7 @@ class CursorModel with ChangeNotifier {
|
||||
notifyListeners();
|
||||
return;
|
||||
}
|
||||
if (parent.target?.imageModel.image == null) return;
|
||||
final scale = parent.target?.canvasModel.scale ?? 1.0;
|
||||
dx /= scale;
|
||||
dy /= scale;
|
||||
|
||||
Reference in New Issue
Block a user