-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add basic node store #1098
base: podesta/build-safety
Are you sure you want to change the base?
add basic node store #1098
Conversation
.addCase(reset, (state, action) => { | ||
state = getInitialState() | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the formatting on this file is odd - add a new line and then 2 character tabs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the formatting on the Node store file though :)
|
||
const addNode = createAction<any>('ADD_NODE') | ||
const updateNodeUIPosition = createAction<any>('UPDATE_NODE_UI_POSITION') | ||
const reset = createAction<any>('LEFTPANELSTORE_RESET'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anything we can do to add a more specific type than any
? Even a simple base type?
const setNodeInitialPosition = (config, state) => { | ||
const canvasPanning = state.canvasPanning; | ||
|
||
const sourcePosition = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments on transformations here
}); | ||
// angular.forEach(this.state.nodes, (node) => { | ||
// node.selected = false; | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed?
add the node store to set nodes from left panel and render on canvas