react-flow-chart icon indicating copy to clipboard operation
react-flow-chart copied to clipboard

Delete selected edge

Open iddan opened this issue 6 years ago • 5 comments

When an edge is selected and I press the Esc button I expect it to be removed

iddan avatar Jan 08 '19 21:01 iddan

How about delete/backspace to delete and Esc to deselect all?

MrBlenny avatar Jan 08 '19 21:01 MrBlenny

What about deleting nodes and links? Backspace doesn't work for when I want to delete those.

BboyAkers avatar Jan 09 '19 15:01 BboyAkers

Oops, I meant Backspace. It was very late when I opened the issue. @MrBlenny it would be wonderful!

iddan avatar Jan 09 '19 18:01 iddan

@BboyAkers I have not added backspace key binds yet, only delete. Check out the button deletion example here: Demo: https://mrblenny.github.io/react-flow-chart/index.html?selectedKind=Sidebar&selectedStory=Selected%20Sidebar&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook-addon-viewport%2Faddon-panel Code: https://github.com/MrBlenny/react-flow-chart/blob/master/stories/SelectedSidebar.tsx

I'll add some backspace config to https://github.com/MrBlenny/react-flow-chart/blob/master/src/components/Canvas/Canvas.wrapper.tsx#L46 when I can.

MrBlenny avatar Jan 11 '19 02:01 MrBlenny

I can delete both nodes and links nowadays when pressing Delete or Backspace. This issue also seems rather old.

Is this still a thing?

davidanitoiu avatar May 17 '20 08:05 davidanitoiu