0.3.3: Fixed crashing bug when an IC is placed with no inputs
This commit is contained in:
parent
fce90becfc
commit
a1668b6f88
@ -12,6 +12,10 @@ To be decided, but at this moment this code is open source and free to use for n
|
||||
|
||||
## Changelog
|
||||
|
||||
### 0.3.3
|
||||
|
||||
* Fixed a bug that crashed the engine when attempting to place an IC with no inputs
|
||||
|
||||
### 0.3.2
|
||||
|
||||
* Added IC Element, allows for converting a logic design to an IC for use in designs.
|
||||
|
@ -679,7 +679,8 @@ class ICElement extends Element {
|
||||
if ((mouseDist <= (this.outputCircleRadius)) && !this.LogicEngine.ActiveLink) ctx.fillStyle = circleColorHover;
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
let textSize = this.textSize(ctx,this.InputConnections[a].toElement.Properties[0].CurrentValue,"10px Console");
|
||||
let textSize = false;
|
||||
if (ctx,this.InputConnections[a]) textSize = this.textSize(ctx,this.InputConnections[a].toElement.Properties[0].CurrentValue,"10px Console");
|
||||
this.drawText(ctx,(x+(this.Width-10)) - (textSize.width + 5 + (this.outputCircleRadius*2)),(firstY + (a*24)) + 5,this.Outputs[a].fromElement.Properties[0].CurrentValue,"10px Console","#000");
|
||||
}
|
||||
ctx.restore();
|
||||
|
Loading…
Reference in New Issue
Block a user