I'm trying to display a dialog when a connection is being established by drag and drop.
I'm modifying the makeTarget call in the stateMachineDemo.js:
jsPlumb.makeTarget(jsPlumb.getSelector(".w"), {
dropOptions:{ hoverClass:"dragHover" },
anchor:"Continuous",
isTarget:true,
beforeDrop:function(params) { return confirm("Connect " + params.sourceId + " to " + params.targetId + "?"); }
});
But somehow this does not work. Any tips how I can modify this demo to get a dialog to come up before the connection is established?
Thanks in advance,
Chris R.
Do you think you could possibly put together a jsFiddle for this?
You can use this jsPlumb :
http://jsplumb.org/js/jquery.jsPlumb-1.3.6-all.js
Simon
--
Simon Porritt
This looks like it should work; did you get that beforeDrop code from
the draggable connectors demo? The only difference between that one
and this is that here you're using makeTarget, so it makes me a bit
suspicious that there could be a bug here.Do you think you could possibly put together a jsFiddle for this?
You can use this jsPlumb :http://jsplumb.org/js/jquery.jsPlumb-1.3.6-all.js
Simon
I've fixed this in 1.3.7 now. I hope to release 1.3.7 fairly soon.
SImon
Thanks for that - I was just about write back and say that I checked
this and it's definitely a bug. Sorry to have made you put together
that fiddle.I've fixed this in 1.3.7 now. I hope to release 1.3.7 fairly soon.
SImon
You can always build a copy from the source, if you have ant installed:
ant -Dversion=1.3.7-RC1
It ends up in build/1.3.7/js.
On 03/03/2012 10:22 AM, "Chris R." <cre...@yahoo.com> wrote:
Thanks!
Is it possible to get a hold of your changes that fixes this before 1.3.7 is released?BTW, thanks for this very useful library!
Chris R.
On Friday, March 2, 2012 3:03:55 PM UTC-8, simon....@gmail.com wrote:
>
> Thanks for that - I was just about write back and say that I checked
> this and it's definitely...
>
> On Sat, Mar 3, 2012 at 9:48 AM, Chris R. wrote:
> > Hi Simon,
> >
> > Here is the jsFiddle:
> >...