/*
* This file contains the JS that handles the first init of each YUI3 demonstration, and also switching
* between render modes.
*/
YUI().use("node", function(Y) {
jsPlumb.bind("ready", function() {
// chrome fix.
document.onselectstart = function () { return false; };
// render mode
var resetRenderMode = function(desiredMode) {
var newMode = jsPlumb.setRenderMode(desiredMode);
Y.all(".rmode").each(function(e) { e.removeClass("selected"); });
Y.all(".rmode[mode='" + newMode + "']").each(function(e) { e.addClass("selected"); });
var disableList = (newMode === jsPlumb.VML) ? ".rmode[mode='canvas'],.rmode[mode='svg']" : ".rmode[mode='vml']";
Y.all(disableList).each(function(e) {
e.setAttribute("disabled", true)
});
jsPlumbDemo.init();
};
Y.all(".rmode").each(function(r) {
r.on("click", function() {
var desiredMode = r.getAttribute("mode");
if (jsPlumbDemo.reset) jsPlumbDemo.reset();
jsPlumb.reset();
resetRenderMode(desiredMode);
});
});
resetRenderMode(jsPlumb.CANVAS);
});
});
# |
Change |
User |
Description |
Committed |
|
#1
|
16445 |
christiane_renck |
Rename/move file(s) |
|
|
//guest/christiane_renck/MergeQuestJS/main/demos/jsPlumb/flowchartDemo/demo-helper-yui3.js |
#1
|
16444 |
christiane_renck |
Adding MergeQuestJS to the Workshop. |
|
|