Skip to content

Commit

Permalink
fix attribute of data
Browse files Browse the repository at this point in the history
remove unused parameters
  • Loading branch information
sunilshetye committed Jan 10, 2025
1 parent a418889 commit eb5951d
Show file tree
Hide file tree
Showing 7 changed files with 282 additions and 283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export default function LoadGrid (container, sidebar, outline) {
return null
}

graph.addEdge = function (edge, parent, source, target, index) {
graph.addEdge = function (_edge, _parent, source, target) {
if (source == null || target == null) {
return null
}
Expand Down Expand Up @@ -362,7 +362,7 @@ export default function LoadGrid (container, sidebar, outline) {

// White in-place editor text color
const mxCellEditorStartEditing = mxCellEditor.prototype.startEditing
mxCellEditor.prototype.startEditing = function (cell, trigger) {
mxCellEditor.prototype.startEditing = function () {
mxCellEditorStartEditing.apply(this, arguments)

if (this.textarea != null) {
Expand Down Expand Up @@ -584,7 +584,7 @@ export default function LoadGrid (container, sidebar, outline) {
}

// Updates the terminal and control points in the cloned preview.
mxEdgeSegmentHandler.prototype.clonePreviewState = function (point, terminal) {
mxEdgeSegmentHandler.prototype.clonePreviewState = function (point) {
const clone = mxEdgeHandler.prototype.clonePreviewState.apply(this, arguments)
clone.cell = clone.cell.clone()

Expand All @@ -604,7 +604,7 @@ export default function LoadGrid (container, sidebar, outline) {
}

const mxEdgeHandlerConnect = mxEdgeHandler.prototype.connect
mxEdgeHandler.prototype.connect = function (edge, terminal, isSource, isClone, me) {
mxEdgeHandler.prototype.connect = function (edge, terminal, isSource) {
let result = null
const model = this.graph.getModel()

Expand Down Expand Up @@ -649,7 +649,7 @@ export default function LoadGrid (container, sidebar, outline) {
const marker = mxConnectionHandlerCreateMarker.apply(this, arguments)

// Uses complete area of cell for new connections (no hotspot)
marker.intersects = function (state, evt) {
marker.intersects = function () {
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@ export default function keyboardShortcuts (graph) {
// })

// Undo - Ctrl + Z
keyHandler.bindControlKey(90, function (evt) {
keyHandler.bindControlKey(90, function () {
if (graph.isEnabled()) {
editorUndo()
}
})

// Redo - Ctrl + A
keyHandler.bindControlKey(65, function (evt) {
keyHandler.bindControlKey(65, function () {
if (graph.isEnabled()) {
editorRedo()
}
})

// Zoom In - Ctrl + I
keyHandler.bindControlKey(73, function (evt) {
keyHandler.bindControlKey(73, function () {
if (graph.isEnabled()) {
editorZoomIn()
}
})

// Zoom Out - Ctrl + O
keyHandler.bindControlKey(79, function (evt) {
keyHandler.bindControlKey(79, function () {
if (graph.isEnabled()) {
editorZoomOut()
}
})

// Zoom Out - Ctrl + Y
keyHandler.bindControlKey(89, function (evt) {
keyHandler.bindControlKey(89, function () {
if (graph.isEnabled()) {
editorZoomAct()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const {
mxPoint
} = new mxGraphFactory()

export default function toolbarTools (grid, unredo) {
export default function toolbarTools (grid) {
graph = grid

undoManager = new mxUndoManager()
Expand Down
7 changes: 3 additions & 4 deletions blocks/eda-frontend/src/redux/actions/authActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const login = (email, password, toUrl) => {
}

// Handle api call for user sign up
export const signUp = (email, password, reenterPassword, history) => (dispatch) => {
export const signUp = (email, password, reenterPassword) => (dispatch) => {
const body = {
email,
username: email,
Expand All @@ -133,7 +133,6 @@ export const signUp = (email, password, reenterPassword, history) => (dispatch)
data: 'Successfully Signed Up! A verification link has been sent to your email account.'
}
})
// history.push('/login')
}
})
.catch((err) => {
Expand Down Expand Up @@ -229,7 +228,7 @@ const signUpError = (message) => (dispatch) => {
}

// Api call for Google oAuth login or sign up
export const googleLogin = (host, toUrl) => {
export const googleLogin = (host) => {
return function (dispatch) {
api.get('auth/o/google-oauth2/?redirect_uri=' + host + '/api/auth/google-callback')
.then((res) => {
Expand All @@ -253,7 +252,7 @@ export const googleLogin = (host, toUrl) => {
}

// Api call for GitHub OAuth login or sign up
export const githubLogin = (host, toUrl) => {
export const githubLogin = (host) => {
return function (dispatch) {
api.get('auth/o/github/?redirect_uri=' + host + '/api/auth/github-callback')
.then((res) => {
Expand Down
6 changes: 3 additions & 3 deletions blocks/eda-frontend/src/redux/actions/saveSchematicActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export const setSchShared = (share) => (dispatch, getState) => {
}

// Action for Loading Gallery schematics
export const loadGallery = (saveId) => (dispatch, getState) => {
export const loadGallery = (saveId) => (dispatch) => {
// Find the gallery schematic that matches the given save_id
const data = GallerySchSample.find(sample => sample.save_id === saveId)

Expand Down Expand Up @@ -201,14 +201,14 @@ export const loadGallery = (saveId) => (dispatch, getState) => {
console.error('Error converting xcos to xml:', error)
})
} else {
handleGalleryLoad(dispatch, data, data.dataDump)
handleGalleryLoad(dispatch, data, data.data_dump)
dispatch(setLoadingDiagram(false))
}
window.loadGalleryComplete = true
}

// Action for Loading local exported schematics
export const openLocalSch = (obj) => (dispatch, getState) => {
export const openLocalSch = (obj) => (dispatch) => {
const data = obj

dispatch({ type: actions.CLEAR_DETAILS })
Expand Down
Loading

0 comments on commit eb5951d

Please sign in to comment.