Search code examples
jsplumb

Set class on clicked connection


Is it possible to highlight at selected connection by setting a css class that works in most browsers. I have tried to add a class that uses filter to create a "dropshadow" but that only works in chrome.


Solution

  • When ever a connection is clicked (selected) then you can modify its properties as I have changed the color of connection through setPaintStyle function. For more such functions refer the API Document

            jsPlumb.bind('click', function (connection, e) {
    
                     connection.setPaintStyle({fillStyle:'red'});
    
            });