From 626d869a1ebc845ab816918011cb3db34f41b656 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 11329d8b..43a6f6e2 100644 --- a/src/ui/DisplayedCircuit.js +++ b/src/ui/DisplayedCircuit.js @@ -117,7 +117,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; }