react-konva icon indicating copy to clipboard operation
react-konva copied to clipboard

can raphael-lib based svg be manipulated with react-konva

Open biotech7 opened this issue 2 years ago • 6 comments

in a chemical sketcher, chemical bonds and other symbols are depicted in svg format on canvas based on raphael lib. my question is : all the depicted objects mentioned above could be munipulated(useState, useRef,useContext, hook....etc) with react-konva in a same instance/app? if so, are there any examples or hints to follow?

Regards!

biotech7 avatar Apr 25 '22 12:04 biotech7

I don't understand what you are trying to achieve. Do you have any specific example of what you want to do?

lavrton avatar Apr 25 '22 21:04 lavrton

for example: as drawing a chemical structure on the raphael-lib based canvas, when hovering on the circle area and press key R,mouse event is caught and the text 'CH3' is replace with 'R'. snap

biotech7 avatar Apr 26 '22 03:04 biotech7

snap

biotech7 avatar Apr 26 '22 05:04 biotech7

IF you already control canvas with raphael, I don't think there is a space for react-konva.

lavrton avatar Apr 26 '22 17:04 lavrton

Ok, let me take a second thought on how to reconstruct a 'connection' between raphael and konva.

biotech7 avatar Apr 27 '22 00:04 biotech7

failed to replace raphael with react-konva. cannot connect DOM-based toolbars with reac-konva canvas in terms of states,refs,contexts....etc. a reasonable framework is preferred.

biotech7 avatar May 05 '22 07:05 biotech7