How can I switch off the grid?

Hi there, is it possible to switch off the grid in the background? I'd prefer a white or black background. Please help. Thanks-

by nilzf
May 01, 2012

First, to confirm: You want to switch off the display of the grid, not the snapping of components to a subset of possible locations. Snapping is practically mandatory in schematics, otherwise you'll end up with wires that won't line up and nodes which won't connect. AutoCAD Electrical is the only software I know of that doesn't have a layout grid, and I can tell you from experience that it is terrible to work with.

Second, no, the editor does not allow you to switch off the grid in the preferences. However, ff you wanted to do this with a bookmarklet or userscript, the line to work with would be

<div id="jcont" tabindex="-1" 
style="position: absolute;  
background-image:  
    url(https://www.circuitlab.com
    /assets/images/gridcell.png);  
top: -1058.5px;
left: -1800px; 
width: 5040px; 
height: 2892px; ">

I opened my Chrome dev tools (right-click the editor background anywhere and choose "Inspect element", the above line will probably be just above the blue highlighted line) and deleted the background-image: url(https....gridcell.png) element, this produced a white background. Everything seemed to continue working, but I didn't do an exhaustive test.

You could get a black background with background-color, though this would make it rather difficult to see the circuit and would require an awful lot of other elements to be changed to white or light gray instead. It could be done with a userscript or extension, though. Brush up on your javascript and let us know what you end up building!

I suggest you try this manually and then come back with some feedback about how well it works. Do you just want it for screenshots? Is it easy to place components and wires when you loose the visual grid? Do you want it for usability reasons, perhaps you or someone you know has vision problems and prefers a higher contrast which the grid interferes with, and does editing the background to white solve this problem?

If you develop a well-loved extension to change the colors, that would definitely encourage our busy developers to implement this option in the real editor. Otherwise, I don't think this is really a high priority.

by KevinVermeer
May 16, 2012

I teach engineering at a community college and often want to take screenshots very quickly for copy and paste to quizzes and other material (step-by-step examples, etc). Going to a pdf or exporting images is time consuming for these throw-away circuits.

I also use Adblock and found that if I put:

circuitlab.com##div[id="grid_container"]

in the custom Adblock filters the grid is removed. (works as of 4/2019).

Pausing Adblock and reloading will bring it back. That's quick and easy enough for me now (I keep grid off most of the time). So I thought I'd mention it here as an option.

by clartemis
April 05, 2019

This feature might not be at a high priority but obviously it is easy to implement (as you already detailed how to implement it). So maybe you could sneak this feature into your developer's busy schedule anyhow. Maybe as a little programming piece for a new junior developer.

by Dan.Ka
November 12, 2019

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.