the base logicGates page
This commit is contained in:
parent
c4883b9484
commit
8893967cb8
39 changed files with 519 additions and 293 deletions
src/modules/simulationRenderer/classes
|
@ -67,7 +67,6 @@ export class SimulationRenderer {
|
|||
}
|
||||
|
||||
public constructor(
|
||||
public ref: RefObject<HTMLCanvasElement>,
|
||||
options: Partial<SimulationRendererOptions> = {},
|
||||
public simulation = new Simulation('project', 'default')
|
||||
) {
|
||||
|
@ -83,6 +82,8 @@ export class SimulationRenderer {
|
|||
|
||||
this.lastMousePosition = worldPosition
|
||||
|
||||
console.log('click')
|
||||
|
||||
// We need to iterate from the last to the first
|
||||
// because if we have 2 overlapping gates,
|
||||
// we want to select the one on top
|
||||
|
@ -290,9 +291,9 @@ export class SimulationRenderer {
|
|||
this.reloadSave()
|
||||
}
|
||||
|
||||
public updateWheelListener() {
|
||||
if (this.ref.current) {
|
||||
this.ref.current.addEventListener('wheel', event => {
|
||||
public updateWheelListener(ref: RefObject<HTMLCanvasElement>) {
|
||||
if (ref.current) {
|
||||
ref.current.addEventListener('wheel', event => {
|
||||
if (!modalIsOpen()) {
|
||||
event.preventDefault()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue