[turbolizer] Snappier transitions when zooming selections
Bug: v8:7327 Change-Id: I79c55d93b8a9f05b81fcbb1897d946cb56e99370 Notry: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901270 Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#64833}
This commit is contained in:
parent
5e97378f92
commit
2d0d184d85
@ -915,11 +915,10 @@ export class GraphView extends PhaseView {
|
||||
const dy = maxY - minY;
|
||||
const x = (minX + maxX) / 2;
|
||||
const y = (minY + maxY) / 2;
|
||||
const scale = Math.min(width / (1.1 * dx), height / (1.1 * dy));
|
||||
const scale = Math.min(width / dx, height / dy) * 0.9;
|
||||
this.svg
|
||||
.transition().duration(300).call(this.panZoom.translateTo, x, y)
|
||||
.transition().duration(300).call(this.panZoom.scaleTo, scale)
|
||||
.transition().duration(300).call(this.panZoom.translateTo, x, y);
|
||||
.transition().duration(120).call(this.panZoom.scaleTo, scale)
|
||||
.transition().duration(120).call(this.panZoom.translateTo, x, y);
|
||||
}
|
||||
|
||||
viewWholeGraph() {
|
||||
|
Loading…
Reference in New Issue
Block a user