Minor UI issue in recent Firefox (starting at about Firefox 115)
cduck opened this issue · comments
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](https://private-user-images.githubusercontent.com/2476062/258987988-02ad6a89-d7cf-4880-bb49-2eb9d829bb4e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5OTAzOTQsIm5iZiI6MTcyMTk5MDA5NCwicGF0aCI6Ii8yNDc2MDYyLzI1ODk4Nzk4OC0wMmFkNmE4OS1kN2NmLTQ4ODAtYmI0OS0yZWI5ZDgyOWJiNGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcyNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MjZUMTAzNDU0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDEyNDJiNjlhZWIyNzdjZTVmMWUxMWNiMTM4NTQ3MTQxNmFkMzEyMWE1NWZjM2NjMzAyZWJmNDhlYTIwNGMzNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.whcPu4BQVPxu6utGC94ZjJb8HstyLTVdmDUV2vDMWi8)
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);
Thanks for reporting this to Mozilla. I will sit back and watch.