Search code examples
javascriptjqueryjsplumb

Specification of jsPlumb.on () function


I use jsPlumb library. I don't fully understand a list of arguments of jsPlumb.on() function. I can't find specification of that method in jsPlumb documentation. There is following example of using it:

jsPlumb.on("#main", "click", "[savelayout]", function () {});

Where #main is id of div element, which contains jsPlumb's layout for painting graph, click is event, savelayout is attribute of button. Meaning of event and attribute is obvious, but I don't understand what value should and can take first argument (#main in example).

Is that function some extension of jQuery.on() function? If it true, can anybody explain that mechanism?

EDIT

Example of using jsPlumb.on() can be found here .


Solution

  • After a little digging and research, all I can say is that it is one of the internal methods which they chose not to expose.

    It is one of those methods which you'd like to keep to make the task easier but won't like to expose, since it's more of an internal method.

    I'd suggest filing an issue with jsPlumb to know the exact cause - https://github.com/sporritt/jsplumb/issues