Hi James,
I haven't looked at the handlers properly, but I see that there is a lot of code duplication. You can replace the code from line 42 till 332 with the following:
risk.forEach(function(r) {
// apply the draggable JQuery UI plugin to the MyDraggableSymbol symbol on your stage
sym.$(r).draggable({
start: function(e){},
drag: function(e,ui)
{
sym.getSymbol(r).stop("Initial");
sym.setVariable("symName",r);
}
}
);
//adding for risk3_orange similarly add for other symbols
sym.$(r).draggable();
sym.getSymbol(r).$(r).bind('click tap',function(ev) {
sym.$(r).draggable('disable');
}).unbind('dblclick taphold',function(ev) {
sym.$(r).draggable('enable');
});
});
Assuming that your handlers are setup correctly, it should work the same way for all the instances.
Regards,
Dharmendra