What is layout mode and it's implementation.
Contributing author: @shubhankarsharma00
When you try to change the dimensions of the subcircuit for a Scope you can do it by clicking Edit Layout in the sidebar. When you click Edit Layout it calls toggleLayoutMode
function which hides the properties from sidebar and them initiates temp_buffer which is an instance of layout_buffer class. This buffer is used to reset all the changes made during the layout mode (if the user wishes to do so). Also, in this temp buffer all the input and output nodes are converted to layoutNode which are used to judge where the nodes will be when the circuit will be converted to subcircuit.
Also, the toggling function calls scheduleUpdate
function (from engine.js) which calls the layoutUpdate
function after a timeout. This function is responsible for updating the new dimensions once they are changed during layout mode.
decreaseLayoutHeight
, increaseLayoutHeight
, decreaseLayoutWidth
, increaseLayoutWidth
are four functions binded to the buttons on the right side when in layout mode. Also, there are some helper functions to help with the title placement.
While saving the information for the layout is stored in data.scope[id].layout and this is where it is retrieved from in loadscope function defined in data.js.
CircuitVerse is a web-based simulation software for creating and testing digital circuits. The easy drag and drop feature makes it easier and a fun way to learn about logic circuits and also compatible to be used by teachers as well as students. From simple gates to complex sequential circuits, plot timing diagrams, automatic circuit generation, explore standard ICs, and much more, CircuitVerse has got you covered. It also lets the user store and access the previously built circuits to build yet more complex circuits and generate truth tables for the constructed circuits.
- Home
- Running the server
- Simulator
- Development
- Internationalization (I18n)
- GSoC '19
- GSoC '20
- GSoC '21
- GSoC '22
- GSoC '23
- GSoC '24
- GCI 2019
- Google Season of Docs 2020