Skip to content

Commit

Permalink
Center circuit symbol better when painting custom gate
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Jul 7, 2017
1 parent af4ab4e commit 626d869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/DisplayedCircuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 626d869

Please sign in to comment.