MCPcopy
hub / github.com/paperwm/PaperWM / viewportMoveToX

Method viewportMoveToX

tiling.js:1352–1367  ·  view source on GitHub ↗

* Moves the space viewport to position x. * @param {Number} x

(x, animate = true)

Source from the content-addressed store, hash-verified

1350 * @param {Number} x
1351 */
1352 viewportMoveToX(x, animate = true) {
1353 this.targetX = x;
1354 this.cloneContainer.x = x;
1355 this.startAnimate();
1356 if (animate) {
1357 Easer.addEase(this.cloneContainer,
1358 {
1359 x,
1360 time: Settings.prefs.animation_time,
1361 onComplete: this.moveDone.bind(this),
1362 });
1363 }
1364 else {
1365 this.moveDone.bind(this);
1366 }
1367 }
1368
1369 moveDone(focusedWindowCallback = _focusedWindow => { }) {
1370 if (this.cloneContainer.x !== this.targetX ||

Callers 2

initWorkspacesFunction · 0.80
monitorsChangedMethod · 0.80

Calls 1

startAnimateMethod · 0.95

Tested by

no test coverage detected