Skip to content

Commit aa43f16

Browse files
committed
fix multiple op amp issue. remove spurios logs
1 parent fc12317 commit aa43f16

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

circuitSolver/modules/View.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ export class View extends draw2d.Canvas {
139139
e.createPort("hybrid", inputALocator);
140140
e.createPort("hybrid", inputBLocator);
141141
e.createPort("hybrid", outputLocator);
142-
e.id = `op0`;
142+
e.id = `op${this.opCounter}`;
143+
this.opCounter = this.opCounter + 1;
144+
143145
} else console.log('ERROR: You gave a bad type: ', type)
144146

145147
this.x = x;
@@ -197,6 +199,7 @@ export class View extends draw2d.Canvas {
197199
this.rCounter = 0;
198200
this.cCounter = 0;
199201
this.lCounter = 0;
202+
this.opCounter = 0;
200203
console.log('cleared, now adding this', startupSchematic);
201204

202205
var connections = []

circuitSolver/modules/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ function centerSchematic (schem) {
369369
var wrapperHeight = canvasHolder.offsetHeight;
370370
var centerX = (wrapperWidth-64) / 2;
371371
var centerY = (wrapperHeight-128) / 2;
372-
console.log(centerX,centerY);
372+
// console.log(centerX,centerY);
373373
var minX=0;
374374
var maxX=0;
375375
var minY=0;
@@ -394,7 +394,7 @@ function centerSchematic (schem) {
394394
item.y = item.y + yShift;
395395
}
396396
});
397-
console.log(xShift, yShift, maxX, minX, schem);
397+
// console.log(xShift, yShift, maxX, minX, schem);
398398
return schem;
399399

400400
}

circuitSolver/modules/wdk_draw2d.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ export class init_draw2d {
3535
this.view.installEditPolicy(new draw2d.policy.canvas.SnapToGridEditPolicy(16)); //each grid is a 16x16
3636

3737
this.view.installEditPolicy(new draw2d.policy.canvas.SingleSelectionPolicy());
38-
// this.view.setScrollArea("#canvas");
39-
// this.view.setZoom(this.view.getZoom()*0.7,true);
4038

4139
}
4240

smith_chart/ToDo.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@ DONE - Update function update_schem_component
1212
DONE: -deal with blank line at end of input
1313

1414
//TODO - A big improvement here would be to separate out the impedance calculation and arc drawing. It should calculate impedances, then calculate points along the arc
15-
//also could use a complex number function for all the math
15+
//also could use a complex number function for all the math
16+
17+
1 - Add arrows / sliders next to the values for small tweaking of the numbers
18+
2 - In custom impedance markers, also show the reflection Coefficient and VSWR
19+
20+
--draw2d issues
21+
- grid no scroll
22+
- can't connect ports together
23+
- can't select stuff
24+
- select multiple and drag

0 commit comments

Comments
 (0)