* Moves the space viewport to position x. * @param {Number} x
(x, animate = true)
| 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 || |
no test coverage detected