From 67456d2a28d350c7c5ffe8ab420fc0743f6c4996 Mon Sep 17 00:00:00 2001
From: Sunil Shetye
Date: Sun, 20 Sep 2020 20:49:51 +0530
Subject: cleaning unused properties
---
.../src/components/Dashboard/SchematicCard.js | 2 +-
.../SchematicEditor/ComponentProperties.js | 8 +-
.../src/components/SchematicEditor/Header.js | 8 +-
.../SchematicEditor/Helper/ComponentDrag.js | 6 -
.../components/SchematicEditor/Helper/SvgParser.js | 8 --
.../SchematicEditor/Helper/ToolbarTools.js | 130 ---------------------
.../components/SchematicEditor/SchematicToolbar.js | 18 +--
.../components/SchematicEditor/SimulationScreen.js | 2 +-
blocks/eda-frontend/src/pages/Login.js | 2 +-
blocks/eda-frontend/src/pages/signUp.js | 6 +-
blocks/eda-frontend/src/redux/actions/actions.js | 8 +-
.../eda-frontend/src/redux/actions/authActions.js | 6 +-
.../redux/actions/componentPropertiesActions.js | 2 +-
13 files changed, 31 insertions(+), 175 deletions(-)
diff --git a/blocks/eda-frontend/src/components/Dashboard/SchematicCard.js b/blocks/eda-frontend/src/components/Dashboard/SchematicCard.js
index 72acaa59..63b469a6 100644
--- a/blocks/eda-frontend/src/components/Dashboard/SchematicCard.js
+++ b/blocks/eda-frontend/src/components/Dashboard/SchematicCard.js
@@ -116,7 +116,7 @@ function getDate (jsonDate) {
export default function SchematicCard ({ sch }) {
const classes = useStyles()
- // To handel delete schematic snackbar
+ // To handle delete schematic snackbar
const [snacOpen, setSnacOpen] = React.useState(false)
const handleSnacClick = () => {
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js b/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js
index 30570af9..85a9d86d 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/ComponentProperties.js
@@ -4,9 +4,9 @@ import { setCompProperties } from '../../redux/actions/index'
import { ListItem, ListItemText, Button, TextField } from '@material-ui/core'
export default function ComponentProperties () {
- // component properties that are displayed on the right side bar when user clicks on a component on the grid.
+ // compProperties that are displayed on the right side bar when user clicks on a component on the grid.
- const properties = useSelector(state => state.componentPropertiesReducer.compProperties)
+ const compProperties = useSelector(state => state.componentPropertiesReducer.compProperties)
const isOpen = useSelector(state => state.componentPropertiesReducer.isPropertiesWindowOpen)
const id = useSelector(state => state.componentPropertiesReducer.id)
const parameter_values = useSelector(state => state.componentPropertiesReducer.parameter_values)
@@ -48,9 +48,9 @@ export default function ComponentProperties () {
Object.keys(val).map((keyName, i) => {
if (keyName.match(/^p[0-9]*_value$/)) {
let rootKeyName = keyName.substr(0, 4)
- if (properties[rootKeyName] !== null) {
+ if (compProperties[rootKeyName] !== null) {
return
-
+
}
}
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Header.js b/blocks/eda-frontend/src/components/SchematicEditor/Header.js
index c13c9c05..82ae4fe9 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/Header.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/Header.js
@@ -120,7 +120,7 @@ function Header () {
dispatch(setSchTitle(`${e.target.value}`))
}
- // handel notification snackbar open and close with message
+ // handle notification snackbar open and close with message
const [snacOpen, setSnacOpen] = React.useState(false)
const [message, setMessage] = React.useState('')
@@ -135,7 +135,7 @@ function Header () {
setSnacOpen(false)
}
- // handel schematic Share Dialog box
+ // handle schematic Share Dialog box
const [openShare, setShareOpen] = React.useState(false)
const handleShareOpen = () => {
@@ -170,7 +170,7 @@ function Header () {
}
}
- // handel display format of last saved status
+ // handle display format of last saved status
function getDate (jsonDate) {
var json = jsonDate
var date = new Date(json)
@@ -179,7 +179,7 @@ function Header () {
return `${day} ${month} ${hour}:${minute}:${second}`
}
- // handel Copy Share Url
+ // handle Copy Share Url
const textAreaRef = React.useRef(null)
function copyToClipboard (e) {
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
index 876db60b..108070c1 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ComponentDrag.js
@@ -52,19 +52,14 @@ export default function LoadGrid (container, sidebar, outline) {
mxCell.prototype.CellType = 'This is where you say what the vertex is'
// Tells the magnitude of a resistor/capacitor
mxCell.prototype.Magnitude = null
- // Tells whether the pin is input/output
- mxCell.prototype.pinType = ' '
// Tells if the cell is component, Default is false
mxCell.prototype.Component = false
// Tells if the cell is pin, Default is false
mxCell.prototype.Pin = false
- // Pin number of the component, default is 0
- mxCell.prototype.PinNumber = 0
// Parent component of a pin, default is null
mxCell.prototype.ParentComponent = null
mxCell.prototype.symbol = null
mxCell.prototype.node = null
- mxCell.prototype.PinName = ''
mxCell.prototype.CompObject = null
mxCell.prototype.properties = {}
mxCell.prototype.sourceVertex = false
@@ -72,7 +67,6 @@ export default function LoadGrid (container, sidebar, outline) {
mxCell.prototype.tarx = 0
mxCell.prototype.tary = 0
mxCell.prototype.PointsArray = null
- // mxCell.prototype.ConnectedNode = null
// Enables guides
mxGraphHandler.prototype.guidesEnabled = true
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js
index b3289f2a..2b6732b5 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/SvgParser.js
@@ -67,9 +67,7 @@ export function getSvgMetadata (graph, parent, evt, target, x, y, component) {
pins[i] = graph.insertVertex(v1, null, i, x_pos, y_pos, 0.8, 0.8, pinOrientation)
pins[i].geometry.relative = true;
- pins[i].pinType = 'Input'
pins[i].ParentComponent = v1
- pins[i].PinNumber = i
}
ports = component.initial_explicit_output_ports + component.initial_implicit_output_ports;
@@ -84,9 +82,7 @@ export function getSvgMetadata (graph, parent, evt, target, x, y, component) {
pins[i] = graph.insertVertex(v1, null, i, x_pos, y_pos, 0.8, 0.8, pinOrientation)
pins[i].geometry.relative = true;
- pins[i].pinType = 'Output'
pins[i].ParentComponent = v1
- pins[i].PinNumber = i
}
ports = component.initial_control_ports;
@@ -98,9 +94,7 @@ export function getSvgMetadata (graph, parent, evt, target, x, y, component) {
pins[i] = graph.insertVertex(v1, null, i, x_pos, y_pos, 0.8, 0.8, pinOrientation)
pins[i].geometry.relative = true;
- pins[i].pinType = 'Input'
pins[i].ParentComponent = v1
- pins[i].PinNumber = i
}
ports = component.initial_command_ports;
@@ -112,8 +106,6 @@ export function getSvgMetadata (graph, parent, evt, target, x, y, component) {
pins[i] = graph.insertVertex(v1, null, i, x_pos, y_pos, 0.8, 0.8, pinOrientation)
pins[i].geometry.relative = true;
- pins[i].pinType = 'Output'
pins[i].ParentComponent = v1
- pins[i].PinNumber = i
}
}
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js
index 5384ef7b..3c5ab6c9 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/Helper/ToolbarTools.js
@@ -13,7 +13,6 @@ const {
mxUndoManager,
mxEvent,
mxCodec,
- mxCell,
mxMorphing,
mxPoint
} = new mxGraphFactory()
@@ -176,11 +175,6 @@ export function ErcCheck () {
}
++vertexCount
}
- if (cell.symbol === 'PWR') { // Checking for ground
- console.log('Ground is present')
- console.log(cell)
- ++ground
- }
}
if (vertexCount === 0) {
@@ -220,11 +214,6 @@ function ErcCheckNets () {
}
++vertexCount
}
- if (cell.symbol === 'PWR') {
- console.log('Ground is present')
- console.log(cell)
- ++ground
- }
}
if (vertexCount === 0) {
alert('No Component added')
@@ -246,8 +235,6 @@ function ErcCheckNets () {
// GENERATE NETLIST
export function GenerateNetList () {
- var r = 1
- var v = 1
var c = 1
// var list = graph.getModel().cells
var spiceModels = ''
@@ -270,33 +257,11 @@ export function GenerateNetList () {
node2: '',
magnitude: ''
}
- mxCell.prototype.ConnectedNode = null
var component = list[property]
- if (component.symbol === 'R') {
- // component.symbol = component.symbol + r.toString()
- k = k + component.symbol + r.toString()
- component.value = component.symbol + r.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
-
- ++r
- } else if (component.symbol === 'V') {
- // component.symbol = component.symbol + v.toString()
- console.log(component)
- k = k + component.symbol + v.toString()
- component.value = component.symbol + v.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
- ++v
- } else {
- // component.symbol = component.symbol + c.toString()
k = k + component.symbol + c.toString()
component.value = component.symbol + c.toString()
component.properties.PREFIX = component.value
- // component.symbol = component.value
++c
- }
- // compobj.name = component.symbol
if (component.children !== null) {
for (var child in component.children) {
@@ -322,24 +287,13 @@ export function GenerateNetList () {
pin.edges[wire].targetVertex = pin.edges[wire].target.id
pin.edges[wire].tarx = pin.edges[wire].geometry.targetPoint.x
pin.edges[wire].tary = pin.edges[wire].geometry.targetPoint.y
- } else if (pin.edges[wire].source.ParentComponent.symbol === 'PWR' || pin.edges[wire].target.ParentComponent.symbol === 'PWR') {
- pin.edges[wire].node = 0
- // pin.edges[wire].node = '0'
- pin.edges[wire].value = 0
- // k = k + ' ' + pin.edges[wire].node
- pin.edges[wire].sourceVertex = pin.edges[wire].source.id
- pin.edges[wire].targetVertex = pin.edges[wire].target.id
} else {
- // if (pin.edges[wire].node === null) {
pin.edges[wire].node = pin.edges[wire].source.ParentComponent.properties.PREFIX + '.' + pin.edges[wire].source.value
- pin.ConnectedNode = pin.edges[wire].source.ParentComponent.properties.PREFIX + '.' + pin.edges[wire].source.value
console.log('comp')
- // }
pin.edges[wire].sourceVertex = pin.edges[wire].source.id
pin.edges[wire].targetVertex = pin.edges[wire].target.id
pin.edges[wire].value = pin.edges[wire].node
- // k = k + ' ' + pin.edges[wire].node
}
pin.edges[wire].value = pin.edges[wire].node
}
@@ -362,31 +316,10 @@ export function GenerateNetList () {
}
console.log('component properties', component.properties)
- if (component.properties.PREFIX.charAt(0) === 'V' || component.properties.PREFIX.charAt(0) === 'v' || component.properties.PREFIX.charAt(0) === 'I' || component.properties.PREFIX.charAt(0) === 'i') {
- const comp = component.properties
- if (comp.NAME === 'SINE') {
- k = k + ` SIN(${comp.OFFSET} ${comp.AMPLITUDE} ${comp.FREQUENCY} ${comp.DELAY} ${comp.DAMPING_FACTOR} ${comp.PHASE} )`
- } else if (comp.NAME === 'EXP') {
- k = k + ` EXP(${comp.INITIAL_VALUE} ${comp.PULSED_VALUE} ${comp.FREQUENCY} ${comp.RISE_DELAY_TIME} ${comp.RISE_TIME_CONSTANT} ${comp.FALL_DELAY_TIME} ${comp.FALL_TIME_CONSTANT} )`
- } else if (comp.NAME === 'DC') {
- if (component.properties.VALUE !== undefined) {
- k = k + ' DC ' + component.properties.VALUE
- component.value = component.value + '\n' + component.properties.VALUE
- }
- } else if (comp.NAME === 'PULSE') {
- k = k + ` PULSE(${comp.INITIAL_VALUE} ${comp.PULSED_VALUE} ${comp.DELAY_TIME} ${comp.RISE_TIME} ${comp.FALL_TIME} ${comp.PULSE_WIDTH} ${comp.PERIOD} ${comp.PHASE} )`
- } else {
- if (component.properties.VALUE !== undefined) {
- k = k + ' ' + component.properties.VALUE
- component.value = component.value + '\n' + component.properties.VALUE
- }
- }
- } else {
if (component.properties.VALUE !== undefined) {
k = k + ' ' + component.properties.VALUE
component.value = component.value + '\n' + component.properties.VALUE
}
- }
if (component.properties.EXTRA_EXPRESSION.length > 0) {
k = k + ' ' + component.properties.EXTRA_EXPRESSION
@@ -437,8 +370,6 @@ export function GenerateNetList () {
}
function annotate (graph) {
- var r = 1
- var v = 1
var c = 1
var list = graph.getModel().cells
var netlist = {
@@ -459,50 +390,10 @@ function annotate (graph) {
node2: '',
magnitude: ''
}
- mxCell.prototype.ConnectedNode = null
var component = list[property]
- if (component.symbol === 'R') {
- // component.symbol = component.symbol + r.toString()
- k = k + component.symbol + r.toString()
- component.value = component.symbol + r.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
-
- ++r
- } else if (component.symbol === 'V') {
- // component.symbol = component.symbol + v.toString()
- k = k + component.symbol + v.toString()
- component.value = component.symbol + v.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
- ++v
- } else if (component.symbol === 'C') {
- // component.symbol = component.symbol + v.toString()
- k = k + component.symbol + v.toString()
- component.value = component.symbol + v.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
- ++c
- } else if (component.symbol === 'D') {
- // component.symbol = component.symbol + v.toString()
- k = k + component.symbol + v.toString()
- component.value = component.symbol + v.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
- } else if (component.symbol === 'Q') {
- // component.symbol = component.symbol + v.toString()
- k = k + component.symbol + v.toString()
- component.value = component.symbol + v.toString()
- component.properties.PREFIX = component.value
- // component.symbol = component.value
- } else {
- // component.symbol = component.symbol + c.toString()
k = k + component.symbol + c.toString()
component.value = component.symbol + c.toString()
component.properties.PREFIX = component.value
- // component.symbol = component.value
- }
- // compobj.name = component.symbol
if (component.children !== null) {
for (var child in component.children) {
@@ -516,16 +407,9 @@ function annotate (graph) {
} else if (pin.edges[wire].target.edge === true) {
- } else if (pin.edges[wire].source.ParentComponent.symbol === 'PWR' || pin.edges[wire].target.ParentComponent.symbol === 'PWR') {
- pin.edges[wire].node = 0
- // pin.edges[wire].node = '0'
- pin.edges[wire].value = 0
} else {
- // if (pin.edges[wire].node === null) {
pin.edges[wire].node = pin.edges[wire].source.ParentComponent.properties.PREFIX + '.' + pin.edges[wire].source.value
- pin.ConnectedNode = pin.edges[wire].source.ParentComponent.properties.PREFIX + '.' + pin.edges[wire].source.value
console.log('comp')
- // }
pin.edges[wire].value = pin.edges[wire].node
}
@@ -657,21 +541,13 @@ function parseXmlToGraph (xmlDoc, graph) {
const width = Number(geom.width.value)
v1 = graph.insertVertex(parent, vertexId, vertexName, xPos, yPos, width, height, style)
v1.symbol = cellAttrs.symbol.value
- if (v1.symbol === 'V') {
- try { props = Object.assign({}, ComponentParameters[v1.symbol][cells[i].children[2].attributes.NAME.value]) } catch (e) { props = Object.assign({}, ComponentParameters[v1.symbol][cells[i].children[1].attributes.NAME.value]) }
- } else {
props = Object.assign({}, ComponentParameters[v1.symbol])
- }
try { props.NAME = cells[i].children[2].attributes.NAME.value } catch (e) { props.NAME = cells[i].children[1].attributes.NAME.value }
v1.properties = props
v1.Component = true
v1.CellType = 'Component'
console.log(props)
- if (v1.properties.name === 'VSOURCE') {
- console.log('here it is')
- console.log(v1.properties)
- }
for (var check in props) {
try { v1.properties[check] = cells[i].children[2].attributes[check].value } catch (e) { try { v1.properties[check] = cells[i].children[1].attributes[check].value } catch (e) { console.log('parameter errors') } }
}
@@ -763,7 +639,6 @@ function XMLWireConnections () {
var list = graph.getModel().cells
for (var property in list) {
if (list[property].Component === true && list[property].symbol !== 'PWR') {
- mxCell.prototype.ConnectedNode = null
var component = list[property]
if (component.children !== null) {
@@ -785,13 +660,8 @@ function XMLWireConnections () {
pin.edges[wire].tarx = pin.edges[wire].geometry.targetPoint.x
pin.edges[wire].tary = pin.edges[wire].geometry.targetPoint.y
pin.edges[wire].PointsArray = pin.edges[wire].geometry.points
- } else if (pin.edges[wire].source.ParentComponent.symbol === 'PWR' || pin.edges[wire].target.ParentComponent.symbol === 'PWR') {
- pin.edges[wire].sourceVertex = pin.edges[wire].source.id
- pin.edges[wire].targetVertex = pin.edges[wire].target.id
- pin.edges[wire].PointsArray = pin.edges[wire].geometry.points
} else {
pin.edges[wire].node = pin.edges[wire].source.ParentComponent.properties.PREFIX + '.' + pin.edges[wire].source.value
- pin.ConnectedNode = pin.edges[wire].source.ParentComponent.properties.PREFIX + '.' + pin.edges[wire].source.value
pin.edges[wire].sourceVertex = pin.edges[wire].source.id
pin.edges[wire].targetVertex = pin.edges[wire].target.id
pin.edges[wire].PointsArray = pin.edges[wire].geometry.points
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js b/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
index ecb8cde5..9cbd49c0 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/SchematicToolbar.js
@@ -120,13 +120,13 @@ export default function SchematicToolbar ({ mobileClose, gridRef }) {
setHelpOpen(false)
}
- // Handel Delete component
+ // Handle Delete component
const handleDeleteComp = () => {
DeleteComp()
dispatch(closeCompProperties())
}
- // Handel Notification Snackbar
+ // Handle Notification Snackbar
const [snacOpen, setSnacOpen] = React.useState(false)
const [message, setMessage] = React.useState('')
@@ -260,8 +260,8 @@ export default function SchematicToolbar ({ mobileClose, gridRef }) {
}
}
- // Handel Save Schematic onCloud
- const handelSchSave = () => {
+ // Handle Save Schematic onCloud
+ const handleSchSave = () => {
if (auth.isAuthenticated !== true) {
setMessage('You are not Logged In')
handleSnacClick()
@@ -280,7 +280,7 @@ export default function SchematicToolbar ({ mobileClose, gridRef }) {
}
// Save Schematics Locally
- const handelLocalSchSave = () => {
+ const handleLocalSchSave = () => {
const blob = new Blob([beautify(Save())], { type: 'application/xml' })
const evt = new MouseEvent('click', {
view: window,
@@ -296,7 +296,7 @@ export default function SchematicToolbar ({ mobileClose, gridRef }) {
}
// Open Locally Saved Schematic
- const handelLocalSchOpen = () => {
+ const handleLocalSchOpen = () => {
var obj = {}
const fileSelector = document.createElement('input')
fileSelector.setAttribute('type', 'file')
@@ -347,9 +347,9 @@ export default function SchematicToolbar ({ mobileClose, gridRef }) {
-
+
-
+
@@ -357,7 +357,7 @@ export default function SchematicToolbar ({ mobileClose, gridRef }) {
|
-
+
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js
index 3840594d..b87a4ced 100644
--- a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js
+++ b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js
@@ -356,7 +356,7 @@ export default function SimulationScreen ({ open, close, isResult }) {
:
- SOMETHING WENT WRONG PLEASE CHECK THE SIMULATION PARAMETERS AND SCHEMATIC DIAGRAM. {/* Error handeling message in case of null result */}
+ SOMETHING WENT WRONG PLEASE CHECK THE SIMULATION PARAMETERS AND SCHEMATIC DIAGRAM. {/* Error handling message in case of null result */}
diff --git a/blocks/eda-frontend/src/pages/Login.js b/blocks/eda-frontend/src/pages/Login.js
index f02e7185..65dd88d2 100644
--- a/blocks/eda-frontend/src/pages/Login.js
+++ b/blocks/eda-frontend/src/pages/Login.js
@@ -129,7 +129,7 @@ export default function SignIn (props) {
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
>
- {showPassword ? : } {/* Handel password visibility */}
+ {showPassword ? : } {/* Handle password visibility */}
)
diff --git a/blocks/eda-frontend/src/pages/signUp.js b/blocks/eda-frontend/src/pages/signUp.js
index 5e09e552..f41eead5 100644
--- a/blocks/eda-frontend/src/pages/signUp.js
+++ b/blocks/eda-frontend/src/pages/signUp.js
@@ -68,7 +68,7 @@ export default function SignUp () {
const handleMouseDownPassword = () => setShowPassword(!showPassword)
// Function call for google oAuth sign up.
- const handelGoogleSignup = () => {
+ const handleGoogleSignup = () => {
var host = window.location.protocol + '//' + window.location.host
dispatch(googleLogin(host))
}
@@ -133,7 +133,7 @@ export default function SignUp () {
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
>
- {showPassword ? : } {/* Handel password visibility */}
+ {showPassword ? : } {/* Handle password visibility */}
)
@@ -165,7 +165,7 @@ export default function SignUp () {
fullWidth
variant="outlined"
color="primary"
- onClick={handelGoogleSignup}
+ onClick={handleGoogleSignup}
className={classes.submit}
>
Sign Up With Google
diff --git a/blocks/eda-frontend/src/redux/actions/actions.js b/blocks/eda-frontend/src/redux/actions/actions.js
index d13db51a..4776cd13 100644
--- a/blocks/eda-frontend/src/redux/actions/actions.js
+++ b/blocks/eda-frontend/src/redux/actions/actions.js
@@ -4,24 +4,24 @@ export const TOGGLE_COLLAPSE = 'TOGGLE_COLLAPSE'
export const FETCH_COMPONENTS = 'FETCH_COMPONENTS'
export const TOGGLE_SIMULATE = 'TOGGLE_SIMULATE'
-// Actions for handeling component properties
+// Actions for handling compProperties
export const GET_COMP_PROPERTIES = 'GET_COMP_PROPERTIES'
export const SET_COMP_PROPERTIES = 'SET_COMP_PROPERTIES'
export const CLOSE_COMP_PROPERTIES = 'CLOSE_COMP_PROPERTIES'
-// Actions for handeling and generating netlist
+// Actions for handling and generating netlist
export const SET_NETLIST = 'SET_NETLIST'
export const SET_TITLE = 'SET_TITLE'
export const SET_MODEL = 'SET_MODEL'
export const SET_CONTROL_LINE = 'SET_CONTROL_LINE'
export const SET_CONTROL_BLOCK = 'SET_CONTROL_BLOCK'
-// Actions for handeling simualtion result display
+// Actions for handling simualtion result display
export const SET_RESULT_TITLE = 'SET_RESULT_TITLE'
export const SET_RESULT_GRAPH = 'SET_RESULT_GRAPH'
export const SET_RESULT_TEXT = 'SET_RESULT_TEXT'
-// Actions for handeling user authentication and registeration
+// Actions for handling user authentication and registeration
export const USER_LOADING = 'USER_LOADING'
export const USER_LOADED = 'USER_LOADED'
export const LOGIN_SUCCESSFUL = 'LOGIN_SUCCESSFUL'
diff --git a/blocks/eda-frontend/src/redux/actions/authActions.js b/blocks/eda-frontend/src/redux/actions/authActions.js
index 962175c1..3e94a0f0 100644
--- a/blocks/eda-frontend/src/redux/actions/authActions.js
+++ b/blocks/eda-frontend/src/redux/actions/authActions.js
@@ -55,7 +55,7 @@ export const loadUser = () => (dispatch, getState) => {
})
}
-// Handel api call for user login
+// Handle api call for user login
export const login = (username, password, toUrl) => {
const body = {
password: password,
@@ -104,7 +104,7 @@ export const login = (username, password, toUrl) => {
}
}
-// Handel api call for user sign up
+// Handle api call for user sign up
export const signUp = (email, username, password, history) => (dispatch) => {
const body = {
email: email,
@@ -145,7 +145,7 @@ export const signUp = (email, username, password, history) => (dispatch) => {
})
}
-// Handel api call for user logout
+// Handle api call for user logout
export const logout = (history) => (dispatch, getState) => {
// Get token from localstorage
const token = getState().authReducer.token
diff --git a/blocks/eda-frontend/src/redux/actions/componentPropertiesActions.js b/blocks/eda-frontend/src/redux/actions/componentPropertiesActions.js
index e28c9e24..ce89dbb2 100644
--- a/blocks/eda-frontend/src/redux/actions/componentPropertiesActions.js
+++ b/blocks/eda-frontend/src/redux/actions/componentPropertiesActions.js
@@ -33,7 +33,7 @@ export const setCompProperties = (id, parameter_values, block) => (dispatch) =>
})
}
-// Handeling hiding of component properties sidebar
+// Handling hiding of component properties sidebar
export const closeCompProperties = () => (dispatch) => {
dispatch({
type: actions.CLOSE_COMP_PROPERTIES
--
cgit