From ee074eca4d850981b6abb0e5631f6842e06b3111 Mon Sep 17 00:00:00 2001 From: Craig Gidney Date: Thu, 6 Jul 2017 23:10:40 -0700 Subject: [PATCH] Center circuit symbol better when painting custom gate --- src/ui/DisplayedCircuit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/DisplayedCircuit.js b/src/ui/DisplayedCircuit.js index 3cdc6f9e..9b1d35a8 100644 --- a/src/ui/DisplayedCircuit.js +++ b/src/ui/DisplayedCircuit.js @@ -131,7 +131,7 @@ class DisplayedCircuit { */ desiredWidth(forTooltip=false) { if (forTooltip) { - return this.gateRect(1, this.circuitDefinition.columns.length).x + CIRCUIT_OP_LEFT_SPACING; + return this.opRect(this.circuitDefinition.columns.length - 1).right() + CIRCUIT_OP_LEFT_SPACING; } return this._rectForSuperpositionDisplay().right() + 101; }