DaHaiz / ngFlowchart

ngFlowchart enables drag&drop modelling of graphs in web applications
http://one-logic.github.io/ngFlowchart/dist/
MIT License
103 stars 64 forks source link

flowchart not working #24

Open bpurohit opened 8 years ago

bpurohit commented 8 years ago

Hello, I have created one application using ASP.Net vNext MVC. I have implemented flow chart in that. But not working properly. When I try to drag any node it gives me error "Cannot read property 'setData' of undefined" in ngflowchart.js file at line no 180. Should I have to reference all the js files which are listed in app/flowchart folder to my page where I want to display flow chart?

felixsteghofer commented 8 years ago

@mathiasmoeller do you know what the this is good for? event.dataTransfer.setData('Text', 'Just to support firefox');

PerFuchs commented 8 years ago

Google Firefox Drag and Drop problems. I am not sure anymore, but without that line the handler called during dragging, is not called. I will be back on Monday evening New Zealand time.

Is that about the performance problems while dragging?

Have a nice weekend. Sorry, Sebastian can you forward this, if he is not getting it via GitHub?

Felix Steghofer notifications@github.com schrieb am Fr., 3. Juni 2016, 22:58:

@mathiasmoeller https://github.com/mathiasmoeller do you know what the this is good for? event.dataTransfer.setData('Text', 'Just to support firefox');

— You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub https://github.com/ONE-LOGIC/ngFlowchart/issues/24#issuecomment-223550686, or mute the thread https://github.com/notifications/unsubscribe/AJ5swFrOHC1DJAII3vdtotsEGUd4FDe_ks5qIAjsgaJpZM4Im5BX .

sebastianhenneberg commented 8 years ago

I think he got it :)

felixsteghofer commented 8 years ago

@bpurohit
I don't really know much about ASP.Net vNext MVC but you could try to comment out/remove line 180 in dist/ngFlowchart.js see here (or rebuilding it on your own after removing this )

if this solves your issue we could think of a workaround for this framework.

@PerFuchs
Thanks Per, i will have a look at this when time is available. The performance problem is different to this. have a nice weekend :)

mmumshad commented 8 years ago

I have the same issue. I commented out the below line

event.dataTransfer.setData('Text', 'Just to support firefox');

but now getting another error

ngFlowchart.js:168 Uncaught TypeError: Cannot read property 'setDragImage' of undefined

ghost commented 8 years ago

I had the same problem. The issue was, that for example the event in the drag-function was not a 'DragEvent' as it should be, but a generic n.event that does not have the required properties like 'dataTransfer'. However the 'DragEvent' is still stored in the event.originalEvent property, therefore my solution was to add the line

event = event.originalEvent ? event.originalEvent : event;

to the beginning of every function where the event is used in the ngFlowchart.js-file. Hope this helps :)

ashiquemohammed commented 7 years ago

Facing the same issue .