0
我試圖通過將它們分離並將它們拖動到bin對象來處置jsPlumb連接。如果連接在中途被拖放,我希望分離失敗並且連接返回到其初始位置。jsPlumb - BeforeDetach事件未在1.6.2中觸發
jsPlumb.bind("beforeDetach", function (e) {
//If not dropped in bin
return false;
});
我試圖通過使用beforeDetach事件來做到這一點。但是,當我期望時,這似乎不會觸發。但是,當使用jsPlumb 1.3時,它確實工作正常。
JsPlumb 1.3:http://jsfiddle.net/QULdZ/
JsPlumb 1.6:http://jsfiddle.net/pDpCx/
然而,API文檔仍然提到這個事件:
beforeDetach(connection)
This event is fired when a Connection is about to be detached, for whatever reason. Your callback function is passed the Connection that the user has just detached. Returning false from this interceptor aborts the Connection detach.
我能做些什麼來得到這個啓動和運行?