This commit is contained in:
parent
93aac0bc99
commit
674305ce29
@ -421,11 +421,10 @@ class FfiModel with ChangeNotifier {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newRect != _rect) {
|
if (newRect != _rect) {
|
||||||
if (updateCursorPos) {
|
if (newRect.left != _rect?.left || newRect.top != _rect?.top) {
|
||||||
if (newRect.left != _rect?.left || newRect.top != _rect?.top) {
|
parent.target?.cursorModel.updateDisplayOrigin(
|
||||||
parent.target?.cursorModel
|
newRect.left, newRect.top,
|
||||||
.updateDisplayOrigin(newRect.left, newRect.top);
|
updateCursorPos: updateCursorPos);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_rect = newRect;
|
_rect = newRect;
|
||||||
parent.target?.canvasModel
|
parent.target?.canvasModel
|
||||||
@ -1842,12 +1841,14 @@ class CursorModel with ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDisplayOrigin(double x, double y) {
|
updateDisplayOrigin(double x, double y, {updateCursorPos = true}) {
|
||||||
_displayOriginX = x;
|
_displayOriginX = x;
|
||||||
_displayOriginY = y;
|
_displayOriginY = y;
|
||||||
_x = x + 1;
|
if (updateCursorPos) {
|
||||||
_y = y + 1;
|
_x = x + 1;
|
||||||
parent.target?.inputModel.moveMouse(x, y);
|
_y = y + 1;
|
||||||
|
parent.target?.inputModel.moveMouse(x, y);
|
||||||
|
}
|
||||||
parent.target?.canvasModel.resetOffset();
|
parent.target?.canvasModel.resetOffset();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user