Skip to content
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

Open
wants to merge 1 commit into
base: podesta/build-safety
Choose a base branch
from
Open

Conversation

sumengwang
Copy link
Contributor

add the node store to set nodes from left panel and render on canvas

.addCase(reset, (state, action) => {
state = getInitialState()
})
})
Copy link
Collaborator

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.

Copy link
Collaborator

@seanfeld seanfeld left a 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');
Copy link
Collaborator

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 = {
Copy link
Collaborator

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;
// });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants