mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
magnifier: Small cleanup
Use an early return instead of a big if() block to cut down on indentation. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1932>
This commit is contained in:
parent
77b175e763
commit
8f42053b5f
1 changed files with 14 additions and 13 deletions
|
|
@ -232,7 +232,9 @@ var Magnifier = class Magnifier {
|
|||
scrollToMousePos(...args) {
|
||||
const [xMouse, yMouse] = args.length ? args : global.get_pointer();
|
||||
|
||||
if (xMouse != this.xMouse || yMouse != this.yMouse) {
|
||||
if (xMouse === this.xMouse && yMouse === this.yMouse)
|
||||
return;
|
||||
|
||||
this.xMouse = xMouse;
|
||||
this.yMouse = yMouse;
|
||||
|
||||
|
|
@ -246,7 +248,6 @@ var Magnifier = class Magnifier {
|
|||
else
|
||||
this.showSystemCursor();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* createZoomRegion:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue