Add symbol orientations.
This commit is contained in:
@@ -9,6 +9,7 @@ class QedaSymbol
|
||||
@settings = element.library.symbol
|
||||
@shapes = []
|
||||
@attributes = []
|
||||
@orientations = [0]
|
||||
@currentLineWidth = 0
|
||||
sides = ['left', 'right', 'top', 'bottom']
|
||||
schematic = element.schematic
|
||||
|
||||
@@ -3,6 +3,9 @@ twoSided = require './common/two-sided'
|
||||
|
||||
module.exports = (symbol, element, icons = Icons) ->
|
||||
element.refDes = 'C'
|
||||
symbol.orientations = [0, 90, 180, 270]
|
||||
if element.schematic.polarized == true
|
||||
symbol.orientations = [0, 90]
|
||||
icon = new icons.Capacitor(symbol, element)
|
||||
|
||||
twoSided symbol, element, icon
|
||||
|
||||
@@ -4,7 +4,6 @@ module.exports = (symbol, element, icon, leftName = 'L', rightName = 'R') ->
|
||||
schematic = element.schematic
|
||||
settings = symbol.settings
|
||||
pins = element.pins
|
||||
|
||||
schematic.showPinNames ?= false
|
||||
|
||||
leftRegEx = new RegExp("^" + leftName)
|
||||
@@ -37,6 +36,7 @@ module.exports = (symbol, element, icon, leftName = 'L', rightName = 'R') ->
|
||||
schematic.showPinNames = true
|
||||
schematic.showPinNumbers = true
|
||||
enclosure symbol, element, icon
|
||||
symbol.orientations = [0]
|
||||
else
|
||||
decorated = (left.length > 1) or (right.length > 1) or (nc?.length)
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ twoSided = require './common/two-sided'
|
||||
|
||||
module.exports = (symbol, element, icons = Icons) ->
|
||||
element.refDes = 'Y'
|
||||
symbol.orientations = [0, 90, 180, 270]
|
||||
icon = new icons.Crystal(symbol, element)
|
||||
|
||||
twoSided symbol, element, icon
|
||||
|
||||
@@ -3,6 +3,9 @@ twoSided = require './common/two-sided'
|
||||
|
||||
module.exports = (symbol, element, icons = Icons) ->
|
||||
element.refDes = 'D'
|
||||
symbol.orientations = [0, 90]
|
||||
if element.schematic.zener == true
|
||||
symbol.orientations = [180, 270]
|
||||
icon = new icons.Diode(symbol, element)
|
||||
|
||||
# Cathode on the right but has number 1
|
||||
|
||||
@@ -3,6 +3,7 @@ twoSided = require './common/two-sided'
|
||||
|
||||
module.exports = (symbol, element, icons = Icons) ->
|
||||
element.refDes = 'L'
|
||||
symbol.orientations = [0, 90, 180, 270]
|
||||
icon = new icons.Inductor(symbol, element)
|
||||
|
||||
twoSided symbol, element, icon
|
||||
|
||||
@@ -3,6 +3,7 @@ twoSided = require './common/two-sided'
|
||||
|
||||
module.exports = (symbol, element, icons = Icons) ->
|
||||
element.refDes = 'R'
|
||||
symbol.orientations = [0, 90, 180, 270]
|
||||
icon = new icons.Resistor(symbol, element)
|
||||
|
||||
twoSided symbol, element, icon
|
||||
|
||||
Reference in New Issue
Block a user