Strilanc / Quirk

A drag-and-drop quantum circuit simulator that runs in your browser. A toy for exploring and understanding small quantum circuits.
http://algassert.com/quirk
Apache License 2.0
933 stars 158 forks source link

Minor UI issue in recent Firefox (starting at about Firefox 115) #506

Closed cduck closed 11 months ago

cduck commented 1 year ago

This is a bug in Firefox, not Quirk but you may want to track the issue here. The horizontal qubit and measurement wires in the circuit diagram display are rendered as slight zig-zag lines instead of continuous, perfectly horizontal lines.

firefox-canvas-bug

See https://bugzilla.mozilla.org/show_bug.cgi?id=1847681 for more details. At minimum this affects Firefox versions 115 through 116 (and 118 nightly) but it does not affect 109 (or earlier).


Quick-and-dirty fix that corrects the visual issue but breaks all other browsers (and the sampling gate icons): src/draw/Painter.js:451

-         this.ctx.moveTo(x1, y1);
+         this.ctx.moveTo(x1, y1+0.5);
Strilanc commented 11 months ago

Thanks for reporting this to Mozilla. I will sit back and watch.