/*
* This file contains the JS that handles the first init of each jQuery demonstration, and also switching
* between render modes.
*/
jsPlumb.bind("ready", function() {
// chrome fix.
document.onselectstart = function () { return false; };
// render mode
var resetRenderMode = function(desiredMode) {
var newMode = jsPlumb.setRenderMode(desiredMode);
$(".rmode").removeClass("selected");
$(".rmode[mode='" + newMode + "']").addClass("selected");
var disableList = (newMode === jsPlumb.VML) ? ".rmode[mode='canvas'],.rmode[mode='svg']" : ".rmode[mode='vml']";
$(disableList).attr("disabled", true);
jsPlumbDemo.init();
};
$(".rmode").bind("click", function() {
var desiredMode = $(this).attr("mode");
if (jsPlumbDemo.reset) jsPlumbDemo.reset();
jsPlumb.reset();
resetRenderMode(desiredMode);
});
// explanation div is draggable
$("#explanation,.renderMode").draggable();
resetRenderMode(jsPlumb.SVG);
});
# |
Change |
User |
Description |
Committed |
|
#1
|
16445 |
christiane_renck |
Rename/move file(s) |
|
|
//guest/christiane_renck/MergeQuestJS/main/demos/jsPlumb/stateMachineDemo/demo-helper-jquery.js |
#1
|
16444 |
christiane_renck |
Adding MergeQuestJS to the Workshop. |
|
|