mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
cleanup: Use new indentation style for arrays
We've made some progress on transitioning to the modern indentation style, and for arrays the legacy style is now rare enough to make a bulk transition feasible. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2200>
This commit is contained in:
parent
696965c9f7
commit
ac9fbe92e5
15 changed files with 125 additions and 75 deletions
|
|
@ -802,8 +802,10 @@ var ZoomRegion = class ZoomRegion {
|
|||
}
|
||||
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
let [xFocus, yFocus] = [(extents.x + (extents.width / 2)) * scaleFactor,
|
||||
(extents.y + (extents.height / 2)) * scaleFactor];
|
||||
const [xFocus, yFocus] = [
|
||||
(extents.x + (extents.width / 2)) * scaleFactor,
|
||||
(extents.y + (extents.height / 2)) * scaleFactor,
|
||||
];
|
||||
|
||||
if (this._xFocus !== xFocus || this._yFocus !== yFocus) {
|
||||
[this._xFocus, this._yFocus] = [xFocus, yFocus];
|
||||
|
|
@ -997,9 +999,11 @@ var ZoomRegion = class ZoomRegion {
|
|||
let roiWidth = this._viewPortWidth / this._xMagFactor;
|
||||
let roiHeight = this._viewPortHeight / this._yMagFactor;
|
||||
|
||||
return [this._xCenter - roiWidth / 2,
|
||||
this._yCenter - roiHeight / 2,
|
||||
roiWidth, roiHeight];
|
||||
return [
|
||||
this._xCenter - roiWidth / 2,
|
||||
this._yCenter - roiHeight / 2,
|
||||
roiWidth, roiHeight,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1580,8 +1584,10 @@ var ZoomRegion = class ZoomRegion {
|
|||
_screenToViewPort(screenX, screenY) {
|
||||
// Converts coordinates relative to the (unmagnified) screen to coordinates
|
||||
// relative to the origin of this._magView
|
||||
return [this._viewPortWidth / 2 + (screenX - this._xCenter) * this._xMagFactor,
|
||||
this._viewPortHeight / 2 + (screenY - this._yCenter) * this._yMagFactor];
|
||||
return [
|
||||
this._viewPortWidth / 2 + (screenX - this._xCenter) * this._xMagFactor,
|
||||
this._viewPortHeight / 2 + (screenY - this._yCenter) * this._yMagFactor,
|
||||
];
|
||||
}
|
||||
|
||||
_updateMagViewGeometry() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue