Commit 2d0d184d authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[turbolizer] Snappier transitions when zooming selections

Bug: v8:7327
Change-Id: I79c55d93b8a9f05b81fcbb1897d946cb56e99370
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1901270Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64833}
parent 5e97378f
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment