We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug when i delete node getting undefined issue and its blocked the application
To Reproduce Steps to reproduce the behavior:
Expected behavior Should not block the page
Screenshots added screenshots
Desktop (please complete the following information):
Additional context The problem is to check index should be more than or equal to 0 not -1
1- node_modules/beautiful-react-diagrams/esm/hooks/useSchema/schemaReducer.js
case ON_NODE_REMOVE: { // remove all node's links let nextLinks = state.links || []; if (state.nodes) { const index = findIndex(state.nodes, ['id', action.payload.nodeId]); // rendering blocked when getting index === -1 if (index >= 0) { const inputPorts = getNodePortsId(state.nodes[index], 'inputs'); const outputPorts = getNodePortsId(state.nodes[index], 'outputs'); nextLinks = nextLinks.filter( (link) => !inputPorts.includes(link.input) && !outputPorts.includes(link.output), ); state.nodes.splice(index, 1); } }
2- node_modules/beautiful-react-diagrams/esm/Diagram/Link/getEntityCoordinates.js
if (portRefs && entity?.entity?.id && portRefs[entity.entity.id]) { var portEl = portRefs[entity.entity.id];
var _bbox = portEl.getBoundingClientRect(); return getRelativePoint([_bbox.x + _bbox.width / 2, _bbox.y + _bbox.height / 2], [canvas.x, canvas.y]);
}
3- node_modules/beautiful-react-diagrams/esm/Diagram/Link/Link.js
var pathOptions = { type: input?.type === 'port' || output?.type === 'port' ? 'bezier' : 'curve', inputAlignment: input?.entity?.alignment || null, outputAlignment: output?.entity?.alignment || null };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
when i delete node getting undefined issue and its blocked the application
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should not block the page
Screenshots
added screenshots
Desktop (please complete the following information):
Additional context
The problem is to check index should be more than or equal to 0 not -1
1- node_modules/beautiful-react-diagrams/esm/hooks/useSchema/schemaReducer.js
case ON_NODE_REMOVE: { // remove all node's links
let nextLinks = state.links || [];
if (state.nodes) {
const index = findIndex(state.nodes, ['id', action.payload.nodeId]);
// rendering blocked when getting index === -1
if (index >= 0) {
const inputPorts = getNodePortsId(state.nodes[index], 'inputs');
const outputPorts = getNodePortsId(state.nodes[index], 'outputs');
nextLinks = nextLinks.filter(
(link) => !inputPorts.includes(link.input) && !outputPorts.includes(link.output),
);
state.nodes.splice(index, 1);
}
}
2- node_modules/beautiful-react-diagrams/esm/Diagram/Link/getEntityCoordinates.js
if (portRefs && entity?.entity?.id && portRefs[entity.entity.id]) {
var portEl = portRefs[entity.entity.id];
}
3- node_modules/beautiful-react-diagrams/esm/Diagram/Link/Link.js
var pathOptions = {
type: input?.type === 'port' || output?.type === 'port' ? 'bezier' : 'curve',
inputAlignment: input?.entity?.alignment || null,
outputAlignment: output?.entity?.alignment || null
};
The text was updated successfully, but these errors were encountered: