diff --git a/build/dataflow.build.js b/build/dataflow.build.js index 9ccc19a..7675a10 100644 --- a/build/dataflow.build.js +++ b/build/dataflow.build.js @@ -1,4 +1,4 @@ -/*! dataflow.js - v0.0.7 - 2013-10-02 (7:09:36 PM GMT+0200) +/*! dataflow.js - v0.0.7 - 2013-10-02 (7:36:38 PM GMT+0200) * Copyright (c) 2013 Forrest Oliphant; Licensed MIT, GPL */ // Thanks bobnice http://stackoverflow.com/a/1583281/592125 @@ -3638,9 +3638,9 @@ CircularBuffer.IndexError= {}; var KeyBinding = Dataflow.prototype.plugin("keybinding"); var Edit = Dataflow.prototype.plugin("edit"); + var Search = Dataflow.prototype.plugin("search"); KeyBinding.initialize = function(dataflow){ - function zoomIn() { if (dataflow && dataflow.currentGraph && dataflow.currentGraph.view) { dataflow.currentGraph.view.zoomIn(); @@ -3694,6 +3694,10 @@ CircularBuffer.IndexError= {}; break; case 90: // z break; + case 83: // s + event.preventDefault(); + Search.focus(); + break; default: break; } @@ -3829,6 +3833,10 @@ CircularBuffer.IndexError= {}; $button.on('click', function () { dataflow.showPlugin('menu'); }); + + Search.focus = function () { + $input.focus(); + }; }; Search.search = function (text, dataflow) { diff --git a/build/dataflow.min.js b/build/dataflow.min.js index 039dae5..7ab59fb 100644 --- a/build/dataflow.min.js +++ b/build/dataflow.min.js @@ -1,6 +1,6 @@ -/*! dataflow.js - v0.0.7 - 2013-10-02 (7:09:36 PM GMT+0200) +/*! dataflow.js - v0.0.7 - 2013-10-02 (7:36:38 PM GMT+0200) * Copyright (c) 2013 Forrest Oliphant; Licensed MIT, GPL */ function CircularBuffer(a){this._array=new Array(a),this.length=0}CircularBuffer.prototype.toString=function(){return"[object CircularBuffer("+this._array.length+") length "+this.length+"]"},CircularBuffer.prototype.get=function(a){return 0>a||aa||athis.length;)this._array[this.length%this._array.length]=void 0,this.length++;this._array[a%this._array.length]=b,a==this.length&&this.length++},CircularBuffer.prototype.push=function(a){this._array[this.length%this._array.length]=a,this.length++},CircularBuffer.IndexError={},function(){var a=Backbone.Model.extend({$:function(a){return this.$el.find(a)},initialize:function(){this.el=document.createElement("div"),this.el.className="dataflow",this.$el=$(this.el),this.$el.data("dataflow",this);var a=Dataflow.prototype.module("card");if(this.shownCards=new a.Collection,this.shownCards.view=new a.CollectionView({collection:this.shownCards}),this.$el.append(this.shownCards.view.$el),this.debug=this.get("debug"),this.controls=this.get("controls"),this.controls!==!1&&(this.controls=!0),this.controls)for(var b in this.plugins)this.plugins[b].initialize&&this.plugins[b].initialize(this);this.inputs=this.get("inputs"),this.inputs!==!1&&(this.inputs=!0),this.editable=this.get("editable"),this.editable!==!1&&(this.editable=!0);var c=this.get("appendTo");c=c?c:"body","body"===c&&$("html, body").css({margin:"0px",padding:"0px",width:"100%",height:"100%"}),$(c).append(this.el),this.id||(this.id=$(c).attr("id")),this.loadState()},modules:{},module:function(a){return this.modules[a]?this.modules[a]:(this.modules[a]={},this.modules[a])},nodes:{},node:function(a){return this.nodes[a]?this.nodes[a]:(this.nodes[a]={description:""},this.nodes[a])},plugins:{},plugin:function(a){return this.plugins[a]?this.plugins[a]:(this.plugins[a]={},this.plugins[a])},addCard:function(a,b){b||this.hideCards(),this.shownCards.get(a)?this.shownCards.view.bringToTop(a):this.shownCards.add(a)},removeCard:function(a){this.shownCards.remove(a)},hideCards:function(){var a=this.shownCards.where({pinned:!1});this.shownCards.remove(a)},addPlugin:function(a){var b=this.plugins[a.id];if(b||(this.plugins[a.id]=b={}),b.info=a,b.enabled=!0,a.menu){var c=Dataflow.prototype.module("card"),d=new c.Model({dataflow:this,card:{el:a.menu},pinned:a.pinned?!0:!1});b.card=d,this.plugins.menu.addPlugin({id:a.id,icon:a.icon,label:a.label,showLabel:!1})}},showPlugin:function(a){this.plugins[a]&&this.plugins[a].card&&(this.addCard(this.plugins[a].card),"function"==typeof this.plugins[a].onShow&&this.plugins[a].onShow())},enablePlugin:function(a){var b=this.plugins[a];b&&this.addPlugin(b.info)},disablePlugin:function(a){this.plugins.menu.disablePlugin(a)},showContextBar:function(){this.contextBar.view.$el.show()},hideContextBar:function(){this.contextBar.view.$el.hide()},contexts:{},prepareContext:function(a){if(this.contexts[a])return this.contexts[a];var b=this.module("menucard");return this.contexts[a]=new b.Model({id:"context-"+a,dataflow:this,pinned:!0}),this.contexts[a].view=new b.View({model:this.contexts[a]}),this.contexts[a]},addContext:function(a){_.each(a.contexts,function(b){var c=this.prepareContext(b);c.menu.add(a)},this)},changeContext:function(a,b){var c=function(a,b){this.contexts[a]&&(this.contexts[a].set("label",b),this.shownCards.get("context-"+a)||this.shownCards.add(this.contexts[a]))}.bind(this),d=function(a){this.shownCards.get("context-"+a)&&this.shownCards.remove("context-"+a)}.bind(this);a.length>1?(c("nodes",a.length+" nodes"),d("node")):1===a.length?(c("node",a[0].get("label")),d("nodes")):(d("node"),d("nodes")),b.length>1?(c("edges",b.length+" edges"),d("edge")):1===b.length?(c("edge",b[0].id),d("edges")):(d("edge"),d("edges"))},loadGraph:function(a){this.graph&&(this.currentGraph.view&&this.currentGraph.view.remove(),this.graph.view&&this.graph.view.remove(),this.graph.remove());var b=this.module("graph");a.dataflow=this;var c=new b.Model(a);return c.view=new b.View({model:c}),this.$el.append(c.view.render().el),this.graph=this.currentGraph=c,c},showGraph:function(a){this.currentGraph.view.$el.detach(),this.$el.append(a.view.el),a.view.render(),this.currentGraph=a},debug:!1,log:function(a){this.trigger("log",a,arguments),this.debug&&console.log("Dataflow: ",arguments)},types:["all","canvas:2d","canvas:webgl","string","number","int","object","array"]});window.Dataflow=a,"object"==typeof exports&&(exports.Dataflow=a),Backbone.View.prototype.addEvents=function(a){this.delegateEvents(_.extend(_.clone(this.events),a))},Backbone.CollectionView=Backbone.Model.extend({prepend:!1,initialize:function(a){a.tagName&&(this.tagName=a.tagName),a.className&&(this.className=a.className),a.itemView&&(this.itemView=a.itemView),this.el=document.createElement(this.tagName),this.el.className=this.className,this.$el=$(this.el),this.parent=a.parent;var b=this.collection=this.get("collection");b.each(this.addItem,this),b.on("add",this.addItem,this),b.on("remove",this.removeItem,this)},addItem:function(a){a.view||(a.view=new this.itemView({model:a,parent:this.parent}),a.view.render()),this.prepend?this.$el.prepend(a.view.el):this.$el.append(a.view.el)},removeItem:function(a){a.view.remove()}})}(),function(a){var b=Backbone.Model.extend({});a.prototype.loadState=function(){var a="dataflow-"+(this.id?this.id:this.cid),c=JSON.parse(window.localStorage.getItem(a));c||(c={});var d=new b(c);this.set("state",d),d.on("change",function(b){window.localStorage.setItem(a,JSON.stringify(b.toJSON()))})}}(Dataflow),function(a){var b=a.prototype.module("graph"),c=a.prototype.module("node"),d=a.prototype.module("edge");b.Model=Backbone.Model.extend({defaults:{nodes:[],edges:[],panX:0,panY:0,zoom:1},initialize:function(){this.dataflow=this.get("dataflow");var a,b=this.nodes=new c.Collection;b.parentGraph=this,b.on("all",function(){this.trigger("change")},this),b.on("add",function(a){this.dataflow.trigger("node:add",this,a)},this),b.on("remove",function(a){a.remove(),this.dataflow.trigger("node:remove",this,a)},this);var e=this.get("nodes");for(a=0;a0;)this.nodes.remove(this.nodes.at(this.nodes.length-1))},toJSON:function(){return{nodes:this.nodes,edges:this.edges}}})}(Dataflow),function(a){var b=a.prototype.module("node"),c=a.prototype.module("input"),d=a.prototype.module("output");b.Model=Backbone.Model.extend({defaults:function(){return{label:"",description:"",type:"test",x:200,y:100,state:{},selected:!1}},initialize:function(){this.parentGraph=this.get("parentGraph"),this.type=this.get("type"),""===this.get("label")&&this.set({label:this.get("type")});var a=this.inputs;this.inputs=new c.Collection,this.inputs.parentNode=this;for(var b=0;b0;)this.connected[0].remove()}}),b.Collection=Backbone.Collection.extend({model:b.Model})}(Dataflow),function(a){var b=a.prototype.module("input"),c=a.prototype.module("output");c.Model=b.Model.extend({defaults:{id:"output",label:"",type:"all",description:"",multiple:!0}}),c.Collection=Backbone.Collection.extend({model:c.Model})}(Dataflow),function(a){var b=a.prototype.module("edge");b.Model=Backbone.Model.extend({defaults:{z:0,route:0,selected:!1,log:null},initialize:function(){var a,b,c,d=this.get("preview");if(this.parentGraph=this.get("parentGraph"),this.attributes.log=new CircularBuffer(50),d){a=this.get("parentGraph").nodes;var e=this.get("source"),f=this.get("target");e?(b=a.get(this.get("source").node),this.source=b.outputs.get(this.get("source").port)):f&&(c=a.get(this.get("target").node),this.target=c.inputs.get(this.get("target").port))}else{a=this.parentGraph.nodes;try{b=a.get(this.get("source").node),this.source=b.outputs.get(this.get("source").port),c=a.get(this.get("target").node),this.target=c.inputs.get(this.get("target").port)}catch(g){}this.source.connect(this),this.target.connect(this),b.on("send:"+this.source.id,this.send,this),this.bringToTop(),this.on("select",this.select,this)}},select:function(){this.parentGraph.trigger("select:edge",this)},send:function(a){this.target.parentNode.recieve(this.target.id,a)},isConnectedToPort:function(a){return this.source===a||this.target===a},isConnectedToNode:function(a){return this.source.parentNode===a||this.target.parentNode===a},toString:function(){return this.id?this.id:this.get("source").node+":"+this.get("source").port+"::"+this.get("target").node+":"+this.get("target").port},toJSON:function(){return{source:this.get("source"),target:this.get("target"),route:this.get("route")}},bringToTop:function(){var a=0;this.parentGraph.edges.each(function(b){if(b!==this){var c=b.get("z");c>a&&(a=c),b.view&&b.view.unhighlight()}},this),this.set("z",a+1)},remove:function(){this.source.disconnect(this),this.target.disconnect(this),this.collection&&this.collection.remove(this),this.source.parentNode.off("send:"+this.source.id,this.send,this),this.trigger("remove")}}),b.Collection=Backbone.Collection.extend({model:b.Model,comparator:function(a){return a.get("z")}})}(Dataflow),function(a){var b=a.prototype.module("graph");a.prototype.module("node");var c=a.prototype.module("edge"),d=.2,e=1.1;document.createElement("div").style.hasOwnProperty("zoom");var f='
';b.View=Backbone.View.extend({template:_.template(f),className:"dataflow-g",events:{"click .dataflow-graph":"deselect","dragstart .dataflow-graph-panzoom":"panStart","drag .dataflow-graph-panzoom":"pan","dragstop .dataflow-graph-panzoom":"panStop","click .dataflow-graph-gotoparent":"gotoParent",mousewheel:"mouseWheel"},initialize:function(){this.$el.html(this.template(this.model.toJSON()));var a=this.model.get("nodes"),b=this.model.get("edges");this.nodes=a.view={},this.model.nodes.each(this.addNode,this),this.model.nodes.on("add",this.addNode,this),this.model.nodes.on("remove",this.removeNode,this),this.edges=b.view={},this.model.edges.each(this.addEdge,this),this.model.edges.on("add",this.addEdge,this),this.model.edges.on("remove",this.removeEdge,this);var c=this.model.get("parentNode");c||this.$(".dataflow-graph-controls").hide(),this.$(".dataflow-graph-panzoom").draggable({helper:function(){var a=$("
");return this.model.dataflow.$el.append(a),a}.bind(this)}),this.$graphEl=this.$(".dataflow-graph"),this.graphEl=this.$(".dataflow-graph")[0],this.$graphEl.css({transform:"translate3d(0, 0, 0) scale3d(1, 1, 1) ",transformOrigin:"left top"}),this.bindInteraction()},panStartOffset:null,panStart:function(a,b){b&&(this.panStartOffset=b.offset)},pan:function(a,b){if(b){var c=this.model.get("zoom"),d=b.offset.left-this.panStartOffset.left,e=b.offset.top-this.panStartOffset.top;this.$(".dataflow-graph").css({transform:"translate3d("+d/c+"px, "+e/c+"px, 0)"})}},panStop:function(a,b){this.$(".dataflow-graph").css({transform:"translate3d(0, 0, 0)"});var c=this.model.get("zoom"),d=b.offset.left-this.panStartOffset.left,e=b.offset.top-this.panStartOffset.top;this.model.set({panX:this.model.get("panX")+d/c,panY:this.model.get("panY")+e/c})},tempPanX:0,tempPanY:0,setPanDebounce:_.debounce(function(){this.$(".dataflow-graph").css({transform:"translate3d(0, 0, 0)"}),this.model.set({panX:this.model.get("panX")+this.tempPanX,panY:this.model.get("panY")+this.tempPanY}),this.tempPanX=0,this.tempPanY=0},250),mouseWheel:function(a){a.preventDefault();var b=a.originalEvent;this.tempPanX+=b.wheelDeltaX/6,this.tempPanY+=b.wheelDeltaY/6,this.$(".dataflow-graph").css({transform:"translate3d("+this.tempPanX+"px, "+this.tempPanY+"px, 0)"}),this.setPanDebounce()},gotoParent:function(){var a=this.model.get("parentNode");a&&this.model.dataflow.showGraph(a.parentGraph)},bindInteraction:function(){this.bindZoom(),this.bindScroll()},bindZoom:function(){if(window.Hammer){var a,b,c,f,g,h,i,j,k,l,m=this;Hammer(this.$(".dataflow-graph-panzoom")[0]).on("transformstart",function(d){a=m.model.get("zoom"),b=d.gesture.center.pageX,c=d.gesture.center.pageY,f=b/a,g=c/a;var e=m.$el.offset();k=f-e.left,l=g-e.top,m.$graphEl.css({transformOrigin:f+"px "+g+"px"})}).on("transform",function(f){h=Math.max(d/a,Math.min(f.gesture.scale,e/a)),i=(f.gesture.center.pageX-b)/a,j=(f.gesture.center.pageY-c)/a,m.$graphEl.css({transform:"translate3d("+i+"px,"+j+"px, 0) "+"scale3d("+h+","+h+", 1) "})}).on("transformend",function(){m.$graphEl.css({transform:"translate3d(0, 0, 0) scale3d(1, 1, 1) "});var b=a*h;b=Math.max(d,Math.min(b,e)),m.model.set("zoom",b),k*=b,l*=b,m.model.set({panX:m.model.get("panX")+i,panY:m.model.get("panY")+j}),console.log(m.model.attributes)});var n=function(){var a=m.model.get("zoom"),b=m.zoomClass;m.zoomClass=.5>a?"zoom-tiny":.8>a?"zoom-small":1.3>a?"zoom-normal":"zoom-big",m.$graphEl.removeClass(b).addClass(m.zoomClass),m.graphEl.style.zoom=m.model.get("zoom")};this.model.on("change:zoom",n),1!==this.model.get("zoom")&&n()}},zoomClass:1,zoomIn:function(){var a=this.model.get("zoom"),b=.9*a;b=Math.max(d,b),b!==a&&this.model.set("zoom",b)},zoomOut:function(){var a=this.model.get("zoom"),b=1.1*a;b=Math.min(e,b),b!==a&&this.model.set("zoom",b)},zoomCenter:function(){var a=this.model.get("zoom"),b=1;b!==a&&this.model.set("zoom",1)},bindScroll:function(){},render:function(){var a=this;return _.defer(function(){a.rerenderEdges()},this),this},addNode:function(a){var b=this.model.dataflow.nodes[a.type];if(b&&b.View)a.view=new b.View({model:a,graph:this});else{var c=this.model.dataflow.node("base");a.view=new c.View({model:a,graph:this})}this.nodes[a.id]=a.view,a.view.render(),this.$(".dataflow-nodes").append(a.view.el)},removeNode:function(a){a.view.remove(),this.nodes[a.id]=null,delete this.nodes[a.id]},addEdge:function(a){a.view=new c.View({model:a}),this.edges[a.id]=a.view,a.view.render(),this.$(".dataflow-svg-edges")[0].appendChild(a.view.el)},removeEdge:function(a){a.view&&a.view.remove(),this.edges[a.id]=null,delete this.edges[a.id]},rerenderEdges:function(){_.each(this.edges,function(a){a.render()},this)},sizeSVG:function(){try{var a=this.$(".dataflow-svg-edges")[0],b=a.getBBox(),c=Math.max(Math.round(b.x+b.width+50),50),d=Math.max(Math.round(b.y+b.height+50),50);a.setAttribute("width",c),a.setAttribute("height",d)}catch(e){}},deselect:function(){this.model.nodes.invoke("set",{selected:!1}),this.model.edges.invoke("set",{selected:!1}),this.model.trigger("selectionChanged"),this.unfade(),this.model.dataflow.hideCards()},fade:function(){this.model.nodes.each(function(a){a.view&&(a.get("selected")||a.view.fade())}),this.fadeEdges()},fadeEdges:function(){this.model.edges.each(function(a){a.get("selected")||a.source.parentNode.get("selected")||a.target.parentNode.get("selected")?a.view.unfade():a.view.fade()})},unfade:function(){this.model.nodes.each(function(a){a.view&&a.view.unfade()}),this.model.edges.each(function(a){a.view&&a.view.unfade()})},startHighlightCompatible:function(a,b){this.model.nodes.each(function(c){c.outputs.each(function(c){return c!==a?b?((!c.canConnect()||"all"!==c.type&&c.type!==a.type)&&c.view.blur(),void 0):(c.view.blur(),void 0):void 0}),c.inputs.each(function(c){return c!==a?b?(c.view.blur(),void 0):((!c.canConnect()||"all"!==c.type&&c.type!==a.type)&&c.view.blur(),void 0):void 0})})},stopHighlightCompatible:function(){this.$el.find(".dataflow-port.blur").removeClass("blur")}})}(Dataflow),function(a){var b,c=a.prototype.module("node"),d=a.prototype.module("input"),e=a.prototype.module("output"),f='

<%- label %>

',g="";c.View=Backbone.View.extend({template:_.template(f),innerTemplate:_.template(g),className:"dataflow-node",events:function(){return{"click .dataflow-node-header":"select",dragstart:"dragStart",drag:"drag",dragstop:"dragStop"}},initialize:function(a){this.$el.html(this.template(this.model.toJSON())),this.graph=a.graph,this.$el.addClass(this.model.type),this.model.parentGraph.dataflow.editable||this.$(".dataflow-node-edit").hide(),this.inputs=this.model.inputs.view=new d.CollectionView({collection:this.model.inputs,parent:this}),this.outputs=this.model.outputs.view=new e.CollectionView({collection:this.model.outputs,parent:this}),this.$el.draggable({handle:"h1",helper:function(){return $("
")}}),this.$el.data("dataflow-node-view",this),this.$(".dataflow-node-inner").append(this.innerTemplate),this.listenTo(this.model.parentGraph,"change:panX change:panY",this.bumpPosition),this.listenTo(this.model,"change:selected",this.selectedChanged),this.listenTo(this.model,"change:label",this.changeLabel),this.listenTo(this.model,"remove",this.hideInspector),this.$inner=this.$(".dataflow-node-inner")},render:function(){return this.$el.css({left:this.model.get("x")+this.model.parentGraph.get("panX"),top:this.model.get("y")+this.model.parentGraph.get("panY")}),this.$(".dataflow-node-ins").html(this.inputs.el),this.$(".dataflow-node-outs").html(this.outputs.el),this.$(".dataflow-node-controls").hide(),this.$(".label-edit").hide(),this},_alsoDrag:[],_dragDelta:{},$dragHelpers:$('
'),dragStart:function(a,c){c&&(this.model.get("selected")||this.select(a,!0),a.stopPropagation(),b=this.model.parentGraph.get("zoom"),this.$dragHelpers.css({transform:"translate3d(0,0,0)"}),this.$el.parent().append(this.$dragHelpers),this._alsoDrag=this.model.collection.where({selected:!0}),_.each(this._alsoDrag,function(a){var b=a.view.$el,c=$('
').css({width:b.width(),height:b.height(),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)});this.$dragHelpers.append(c)},this))},changeLabel:function(){var a=this.model.get("label"),b=this.model.get("type");this.$(".dataflow-node-title").text(a).attr("title",a+": "+b)},drag:function(a,c){if(c){a.stopPropagation();var d=(c.position.left-c.originalPosition.left)/b,e=(c.position.top-c.originalPosition.top)/b;this.$dragHelpers.css({transform:"translate3d("+d+"px,"+e+"px,0)"})}},dragStop:function(a,c){if(c){a.stopPropagation(),this.model.parentGraph.get("panX"),this.model.parentGraph.get("panY");var d=(c.position.left-c.originalPosition.left)/b,e=(c.position.top-c.originalPosition.top)/b;this._alsoDrag.length&&(_.each(this._alsoDrag,function(a){a.view.moveToPosition(a.get("x")+d,a.get("y")+e)},this),this._alsoDrag=[]),this.$dragHelpers.empty(),this.$dragHelpers.remove()}},bumpPosition:function(){this.$el.css({left:this.model.get("x")+this.model.parentGraph.get("panX"),top:this.model.get("y")+this.model.parentGraph.get("panY")}),this.model.trigger("change:x change:y")},moveToPosition:function(a,b){this.model.set({x:a,y:b},{silent:!0}),this.bumpPosition()},removeModel:function(){this.model.remove()},bringToTop:function(){var a=0;this.model.collection.each(function(b){var c=parseInt(b.view.el.style.zIndex,10);c>a&&(a=c)},this),this.el.style.zIndex=a+1},select:function(a){a&&a.stopPropagation();var b=!1,c=this.model.get("selected");a&&(a.ctrlKey||a.metaKey)?(b=!0,c=!c,this.model.set("selected",c),c||this.fade()):(this.model.parentGraph.edges.invoke("set",{selected:!1}),this.model.parentGraph.nodes.invoke("set",{selected:!1}),this.model.parentGraph.view.fade(),c=!0,this.model.set("selected",!0)),this.bringToTop(),this.model.parentGraph.view.fadeEdges(),this.model.parentGraph.trigger("selectionChanged")},inspector:null,getInspector:function(){if(!this.inspector){var b=new c.InspectView({model:this.model}),d=a.prototype.module("card");this.inspector=new d.Model({dataflow:this.model.parentGraph.dataflow,card:b})}return this.inspector},showInspector:function(a){this.model.parentGraph.dataflow.addCard(this.getInspector(),a)},hideInspector:function(){this.model.parentGraph.dataflow.removeCard(this.getInspector())},fade:function(){this.$el.addClass("fade"),this.$el.removeClass("ui-selected")},unfade:function(){this.$el.removeClass("fade")},selectedChanged:function(){this.model.get("selected")?(this.highlight(),this.showInspector()):(this.unhighlight(),this.hideInspector())},highlight:function(){this.$el.removeClass("fade"),this.$el.addClass("ui-selected")},unhighlight:function(){this.$el.removeClass("ui-selected")}})}(Dataflow),function(a){var b=a.prototype.module("input"),c=a.prototype.module("edge"),d='',e=1;b.View=Backbone.View.extend({template:_.template(d),tagName:"li",className:"dataflow-port dataflow-in",events:{click:"getTopEdge",drop:"connectEdge","dragstart .dataflow-port-hole":"newEdgeStart","drag .dataflow-port-hole":"newEdgeDrag","dragstop .dataflow-port-hole":"newEdgeStop","dragstart .dataflow-port-plug":"changeEdgeStart","drag .dataflow-port-plug":"changeEdgeDrag","dragstop .dataflow-port-plug":"changeEdgeStop"},$input:null,initialize:function(a){this.$el.html(this.template(this.model.toJSON())),this.$el.addClass(this.model.get("type")),this.parent=a.parent;var b=this.parent.model,c=b.parentGraph;this.listenTo(b,"change:x change:y",function(){this._holePosition=null}.bind(this)),this.listenTo(c,"change:panX change:panY",function(){this._holePosition=null}.bind(this));var d=b.get("state");if(d&&d[this.model.id]&&this.$el.addClass("hasvalue"),this.model.parentNode.parentGraph.dataflow.editable){var e=this;if(this.$(".dataflow-port-plug").draggable({cursor:"pointer",helper:function(){var a=$('');return e.parent.graph.$el.append(a),a},disabled:!0,distance:10,delay:100}),this.$(".dataflow-port-hole").draggable({cursor:"pointer",helper:function(){var a=$('').data({port:e.model});return e.parent.graph.$el.append(a),a}}),this.$el.droppable({accept:".dataflow-port-plug.in, .dataflow-port-hole.out",activeClassType:"droppable-hover",refreshPositions:!0}),this.model.parentNode.parentGraph.dataflow.inputs){var f=this.model.get("type"),g=this.model.parentNode.get("state");if(a=this.model.get("options"),void 0!==a&&(_.isString(a)&&(a=a.split(" "),this.model.set("options",a)),_.isArray(a))){for(var h={},i=0;i').append(k).prepend(""+this.model.get("label")+" ");this.$input=l,this.model.connected.length&&l.addClass("connected"),this.model.on("connected",function(){this.$input.addClass("connected")},this),this.model.on("disconnected",function(){this.$input.removeClass("connected")},this)}}},renderInput:function(a,b){var c;if(b){c=$('').attr(f).addClass("int"===a?"input-int":"input-float"),"int"==a?c.change(this.inputInt.bind(this)):c.change(this.inputFloat.bind(this)),c;case"boolean":return c=$('
'),c.change(this.inputBoolean.bind(this)),c;case"object":return c=$(''),c.on("change, keyup",this.inputObject.bind(this)),c;case"bang":return c=$(''),c.click(this.inputBang.bind(this)),c;default:return c=$(''),c.change(this.inputString.bind(this)),c}},setInputValue:function(a,b,c){return a?"SELECT"===a[0].tagName?($("option",a).each(function(){var a=$(this).data("val");$(this).prop("selected",a==c)}),void 0):"boolean"===b?(a.prop("checked",c),void 0):"object"===b?(a.text(JSON.stringify(c,null,2)),void 0):(a.val(c),void 0):void 0},inputSelect:function(a){var b=$(a.target).find(":selected").data("val");this.model.parentNode.setState(this.model.id,b)},inputInt:function(a){this.model.parentNode.setState(this.model.id,parseInt($(a.target).val(),10))},inputFloat:function(a){this.model.parentNode.setState(this.model.id,parseFloat($(a.target).val()))},inputString:function(a){this.model.parentNode.setState(this.model.id,$(a.target).val())},inputBoolean:function(a){this.model.parentNode.setState(this.model.id,$(a.target).prop("checked"))},inputObject:function(a){try{var b=JSON.parse($(a.target).text());this.model.parentNode.setState(this.model.id,b)}catch(c){}},inputBang:function(){this.model.parentNode.setBang(this.model.id)},render:function(){return this},newEdgeStart:function(a,b){if(b){a.stopPropagation(),b.helper.data({route:this.topRoute}),this.previewEdgeNew=new c.Model({target:{node:this.model.parentNode.id,port:this.model.id},parentGraph:this.model.parentNode.parentGraph,preview:!0,route:this.topRoute}),this.previewEdgeNewView=new c.View({model:this.previewEdgeNew});var d=this.model.parentNode.parentGraph.view.$(".dataflow-svg-edges")[0];d.appendChild(this.previewEdgeNewView.el),e=this.model.parentNode.parentGraph.get("zoom"),this.model.parentNode.parentGraph.view.startHighlightCompatible(this.model,!0)}},newEdgeDrag:function(a,b){if(this.previewEdgeNewView&&b){a.stopPropagation(),b.position.top=a.clientY/e,b.position.left=a.clientX/e;var c=this.model.parentNode.parentGraph.view.el;b.position.left+=c.scrollLeft,b.position.top+=c.scrollTop,this.previewEdgeNewView.render({left:b.position.left-c.scrollLeft,top:b.position.top-c.scrollTop}),this.model.parentNode.parentGraph.view.sizeSVG()}},newEdgeStop:function(a){a.stopPropagation(),this.previewEdgeNewView.remove(),delete this.previewEdgeNew,delete this.previewEdgeNewView,this.model.parentNode.parentGraph.view.stopHighlightCompatible(this.model,!0)},getTopEdge:function(){var a,b=-1;return this.isConnected&&(this.model.parentNode.parentGraph.edges.each(function(c){var d=c.get("z");c.target===this.model&&d>b&&(a=c,b=d),c.view&&c.view.unhighlight()},this),a&&a.view&&a.view.bringToTop()),a},changeEdgeStart:function(a,b){if(b&&(a.stopPropagation(),this.isConnected)){var d=this.getTopEdge();if(d){d.remove(),b&&b.helper.data({port:d.source,route:d.get("route")}),this.previewEdgeChange=new c.Model({source:d.get("source"),route:d.get("route"),parentGraph:this.model.parentNode.parentGraph,preview:!0}),this.previewEdgeChangeView=new c.View({model:this.previewEdgeChange});var f=this.model.parentNode.parentGraph.view.$(".dataflow-svg-edges")[0];f.appendChild(this.previewEdgeChangeView.el),e=this.model.parentNode.parentGraph.get("zoom")}}},changeEdgeDrag:function(a,b){b&&(a.stopPropagation(),this.previewEdgeChange&&(this.previewEdgeChangeView.render(b.offset),this.model.parentNode.parentGraph.view.sizeSVG()))},changeEdgeStop:function(a){a.stopPropagation(),this.previewEdgeChange&&(this.previewEdgeChangeView.remove(),delete this.previewEdgeChange,delete this.previewEdgeChangeView)},blur:function(){this.$el.addClass("blur")},unblur:function(){this.$el.removeClass("blur")},connectEdge:function(a,b){var c=b.helper.data("port"),d=this.model.parentNode.parentGraph.edges.length;if(c.parentNode.parentGraph.dataflow!==this.model.parentNode.parentGraph.dataflow)return!1;if(this.model.canConnect()){var e=0;void 0!==b.helper.data("route")&&(e=b.helper.data("route")),this.model.parentNode.parentGraph.edges.add({id:c.parentNode.id+":"+c.id+"::"+this.model.parentNode.id+":"+this.model.id,parentGraph:this.model.parentNode.parentGraph,source:{node:c.parentNode.id,port:c.id},target:{node:this.model.parentNode.id,port:this.model.id},route:e}),b.helper.data("removeChangeEdge",db&&(a=c,b=d)}},this),a)this.bringToTop(a);else{try{this.$(".dataflow-port-plug").draggable("disable")}catch(c){}this.$(".dataflow-port-plug, .dataflow-port-hole").removeClass("active"),this.isConnected=!1}},topRoute:0,bringToTop:function(a){var b=a.get("route");void 0!==b&&(this.$(".dataflow-port-hole, .dataflow-port-plug").removeClass("route"+this.topRoute),this.$(".dataflow-port-hole, .dataflow-port-plug").addClass("route"+b),this.topRoute=b)}}),b.CollectionView=Backbone.CollectionView.extend({tagName:"ul",itemView:b.View})}(Dataflow),function(a){var b=a.prototype.module("output"),c=a.prototype.module("edge"),d='<%= label %>',e=1;b.View=Backbone.View.extend({template:_.template(d),tagName:"li",className:"dataflow-port dataflow-out",events:{click:"getTopEdge",drop:"connectEdge","dragstart .dataflow-port-hole":"newEdgeStart","drag .dataflow-port-hole":"newEdgeDrag","dragstop .dataflow-port-hole":"newEdgeStop","dragstart .dataflow-port-plug":"changeEdgeStart","drag .dataflow-port-plug":"changeEdgeDrag","dragstop .dataflow-port-plug":"changeEdgeStop"},initialize:function(a){this.$el.html(this.template(this.model.toJSON())),this.$el.addClass(this.model.get("type")),this.parent=a.parent;var b=this.parent.model,c=b.parentGraph;if(this.listenTo(b,"change:x change:y change:w",function(){this._holePosition=null}.bind(this)),this.listenTo(c,"change:panX change:panY",function(){this._holePosition=null}.bind(this)),this.model.parentNode.parentGraph.dataflow.editable){var d=this;this.$(".dataflow-port-plug").draggable({cursor:"pointer",helper:function(){var a=$('');return d.parent.graph.$el.append(a),a},disabled:!0,distance:10,delay:100}),this.$(".dataflow-port-hole").draggable({cursor:"pointer",helper:function(){var a=$('').data({port:d.model});return d.parent.graph.$el.append(a),a}}),this.$el.droppable({accept:".dataflow-port-plug.out, .dataflow-port-hole.in",activeClassType:"droppable-hover"})}},render:function(){return this},newEdgeStart:function(a,b){if(a.stopPropagation(),b){b.helper.data({route:this.topRoute}),this.previewEdge=new c.Model({source:{node:this.model.parentNode.id,port:this.model.id},parentGraph:this.model.parentNode.parentGraph,preview:!0,route:this.topRoute}),this.previewEdgeView=new c.View({model:this.previewEdge});var d=this.model.parentNode.parentGraph.view.$(".dataflow-svg-edges")[0];d.appendChild(this.previewEdgeView.el),e=this.model.parentNode.parentGraph.get("zoom"),this.model.parentNode.parentGraph.view.startHighlightCompatible(this.model)}},newEdgeDrag:function(a,b){if(a.stopPropagation(),this.previewEdgeView&&b){b.position.top=a.clientY/e,b.position.left=a.clientX/e;var c=this.model.parentNode.parentGraph.view.el;b.position.left+=c.scrollLeft,b.position.top+=c.scrollTop,this.previewEdgeView.render({left:b.position.left-c.scrollLeft,top:b.position.top-c.scrollTop})}},newEdgeStop:function(a){a.stopPropagation(),this.previewEdgeView.remove(),delete this.previewEdge,delete this.previewEdgeView,this.model.parentNode.parentGraph.view.stopHighlightCompatible(this.model)},getTopEdge:function(){var a,b=-1;return this.isConnected&&(this.model.parentNode.parentGraph.edges.each(function(c){var d=c.get("z");c.source===this.model&&d>b&&(a=c,b=d),c.view&&c.view.unhighlight()},this),a&&a.view&&a.view.bringToTop()),a},changeEdgeStart:function(a,b){if(b&&(a.stopPropagation(),this.isConnected)){var d=this.getTopEdge();if(d){d.remove(),b&&b.helper.data({port:d.target,route:d.get("route")}),this.previewEdgeChange=new c.Model({target:d.get("target"),route:d.get("route"),parentGraph:this.model.parentNode.parentGraph,preview:!0}),this.previewEdgeChangeView=new c.View({model:this.previewEdgeChange});var f=this.model.parentNode.parentGraph.view.$(".dataflow-svg-edges")[0];f.appendChild(this.previewEdgeChangeView.el),e=this.model.parentNode.parentGraph.get("zoom")}}},changeEdgeDrag:function(a,b){b&&(a.stopPropagation(),this.previewEdgeChange&&(this.previewEdgeChangeView.render(b.offset),this.model.parentNode.parentGraph.view.sizeSVG()))},changeEdgeStop:function(a){a.stopPropagation(),this.previewEdgeChange&&(this.previewEdgeChangeView.remove(),delete this.previewEdgeChange,delete this.previewEdgeChangeView)},blur:function(){this.$el.addClass("blur")},unblur:function(){this.$el.removeClass("blur")},connectEdge:function(a,b){var c=b.helper.data("port"),d=this.model.parentNode.parentGraph.edges.length;if(c.parentNode.parentGraph.dataflow!==this.model.parentNode.parentGraph.dataflow)return!1;if(this.model.canConnect()){var e=0;void 0!==b.helper.data("route")&&(e=b.helper.data("route")),this.model.parentNode.parentGraph.edges.add({id:this.model.parentNode.id+":"+this.model.id+"::"+c.parentNode.id+":"+c.id,parentGraph:this.model.parentNode.parentGraph,source:{node:this.model.parentNode.id,port:this.model.id},target:{node:c.parentNode.id,port:c.id},route:e}),b.helper.data("removeChangeEdge",db&&(a=c,b=d)}},this),a)this.bringToTop(a);else{try{this.$(".dataflow-port-plug").draggable("disable")}catch(c){}this.$(".dataflow-port-plug, .dataflow-port-hole").removeClass("active"),this.isConnected=!1}},topRoute:0,bringToTop:function(a){var b=a.get("route");void 0!==b&&(this.$(".dataflow-port-hole").removeClass("route"+this.topRoute),this.$(".dataflow-port-hole").addClass("route"+b),this.topRoute=b)}}),b.CollectionView=Backbone.CollectionView.extend({tagName:"ul",itemView:b.View})}(Dataflow),function(a){var b=a.prototype.module("edge"),c=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)"xlink:href"===d?c.setAttributeNS("http://www.w3.org/1999/xlink","href",b[d]):c.setAttribute(d,b[d]);return c},d=function(a,b){a.classList?a.classList.add(b):a.className="dataflow-edge "+b},e=function(a,b){a.classList?a.classList.remove(b):a.className="dataflow-edge"};b.View=Backbone.View.extend({tagName:"div",className:"dataflow-edge",positions:null,initialize:function(){this.positions={from:null,to:null},this.model.source&&this.model.source.parentNode.on("change:x change:y change:w",this.render,this),this.model.target&&this.model.target.parentNode.on("change:x change:y",this.render,this),this.model.source&&this.model.source.view&&(this.model.source.view.plugSetActive(),this.model.source.view.bringToTop(this.model)),this.model.target&&this.model.target.view&&(this.model.target.view.plugSetActive(),this.model.target.view.bringToTop(this.model)),this.el=c("g",{"class":"dataflow-edge"}),this.elEdge=c("path",{"class":"dataflow-edge-wire"}),this.elShadow=c("path",{"class":"dataflow-edge-shadow"}),void 0!==this.model.get("route")&&this.elEdge.setAttribute("class","dataflow-edge-wire route"+this.model.get("route"));var a=this;this.model.on("change:route",function(){a.elEdge.setAttribute("class","dataflow-edge-wire route"+a.model.get("route")),a.bringToTop()}),this.el.appendChild(this.elShadow),this.el.appendChild(this.elEdge),this.el.addEventListener("click",function(b){a.click(b)}),this.listenTo(this.model,"change:selected",this.selectedChange),this.listenTo(this.model,"remove",this.hideInspector)},render:function(a){var b,c=this.model.source,d=this.model.target;c?this.positions.from=c.view.holePosition():(b=this.model.parentGraph.dataflow.$el.parent().position(),graph=this.model.parentGraph.view.$el,this.positions.from={left:graph.scrollLeft()+a.left-5-b.left,top:graph.scrollTop()+a.top+5-b.top}),d?this.positions.to=d.view.holePosition():(b=this.model.parentGraph.dataflow.$el.parent().position(),graph=this.model.parentGraph.view.$el,this.positions.to={left:graph.scrollLeft()+a.left+15-b.left,top:graph.scrollTop()+a.top+5-b.top});var e=this.edgePath(this.positions);this.elEdge.setAttribute("d",e),this.elShadow.setAttribute("d",e),this.model.parentGraph&&this.model.parentGraph.view&&this.model.parentGraph.view.sizeSVG()},fade:function(){this.model.source.parentNode.get("selected")||this.model.target.parentNode.get("selected")||d(this.el,"fade")},unfade:function(){e(this.el,"fade")},selectedChange:function(){this.model.get("selected")?(this.highlight(),this.showInspector()):(this.unhighlight(),this.hideInspector()),this.model.parentGraph.trigger("selectionChanged")},highlight:function(){d(this.el,"highlight")},unhighlight:function(){e(this.el,"highlight")},edgePath:function(a){var b=20,c=a.to.left-b-(a.from.left+b),d=Math.floor(c/2),e=c-d,f=a.to.top-a.from.top,g=Math.floor(f/2),h=f-g,i="",j="";return Math.abs(f)>Math.abs(c)?f>0?c>0?(i=" L "+(a.from.left+b+d)+" "+(a.from.top+d),j=" L "+(a.to.left-b-e)+" "+(a.to.top-e)):0>c&&(i=" L "+(a.from.left+b+d)+" "+(a.from.top-d),j=" L "+(a.to.left-b-e)+" "+(a.to.top+e)):0>f&&(c>0?(i=" L "+(a.from.left+b+d)+" "+(a.from.top-d),j=" L "+(a.to.left-b-e)+" "+(a.to.top+e)):0>c&&(i=" L "+(a.from.left+b+d)+" "+(a.from.top+d),j=" L "+(a.to.left-b-e)+" "+(a.to.top-e))):Math.abs(f)0?f>0?(i=" L "+(a.from.left+b+g)+" "+(a.from.top+g),j=" L "+(a.to.left-b-h)+" "+(a.to.top-h)):0>f&&(i=" L "+(a.from.left+b-g)+" "+(a.from.top+g),j=" L "+(a.to.left-b+h)+" "+(a.to.top-h)):0>c&&(f>0?(i=" L "+(a.from.left+b-g)+" "+(a.from.top+g),j=" L "+(a.to.left-b+h)+" "+(a.to.top-h)):0>f&&(i=" L "+(a.from.left+b+g)+" "+(a.from.top+g),j=" L "+(a.to.left-b-h)+" "+(a.to.top-h)))),"M "+a.from.left+" "+a.from.top+" L "+(a.from.left+b)+" "+a.from.top+i+j+" L "+(a.to.left-b)+" "+a.to.top+" L "+a.to.left+" "+a.to.top},remove:function(){var a=this.model.source,b=this.model.target;a&&a.parentNode.off(null,null,this),b&&b.parentNode.off(null,null,this),a&&a.view.plugCheckActive(),b&&b.view.plugCheckActive(),this.el.parentNode.removeChild(this.el)},click:function(a){a&&a.stopPropagation();var b;a&&(a.ctrlKey||a.metaKey)?(b=this.model.get("selected"),b=!b):(b=!0,this.model.parentGraph.nodes.invoke("set",{selected:!1}),this.model.collection.invoke("set",{selected:!1})),this.model.set({selected:b}),b&&(this.bringToTop(),this.model.trigger("select"),this.unfade()),this.model.parentGraph.view.fade()},bringToTop:function(){this.model.bringToTop();var a=this.el.parentNode;a&&a.appendChild(this.el),this.model.source.view.bringToTop(this.model),this.model.target.view.bringToTop(this.model)},inspector:null,getInspector:function(){if(!this.inspector){var c=new b.InspectView({model:this.model}),d=a.prototype.module("card");this.inspector=new d.Model({dataflow:this.model.parentGraph.dataflow,card:c})}return this.inspector},showInspector:function(a){this.model.parentGraph.dataflow.addCard(this.getInspector(),a)},hideInspector:function(){this.model.parentGraph.dataflow.removeCard(this.getInspector())}})}(Dataflow),function(a){var b=a.prototype.module("card");b.Model=Backbone.Model.extend({defaults:{pinned:!1},initialize:function(){this.dataflow=this.get("dataflow")},hide:function(){this.dataflow.shownCards.remove(this)}}),b.Collection=Backbone.Collection.extend({model:b.Model})}(Dataflow),function(a){var b=a.prototype.module("card"),c='
';b.View=Backbone.View.extend({tagName:"div",className:"dataflow-card",template:_.template(c),events:{"click .dataflow-card-pin":"togglePin","click .dataflow-card-close":"hide"},initialize:function(){this.$el.html(this.template()),this.card=this.model.get("card"),this.$el.append(this.card.el),this.listenTo(this.model,"change:pinned",this.pinnedChanged),this.pinnedChanged()},animate:function(a){"function"==typeof this.card.animate&&this.card.animate(a)},togglePin:function(){var a=!this.model.get("pinned");this.model.set("pinned",a),a||this.hide()},pinnedChanged:function(){this.model.get("pinned")?this.$(".dataflow-card-pin").addClass("active"):this.$(".dataflow-card-pin").removeClass("active")},hide:function(){this.model.hide()},remove:function(){this.$el.detach()}}),window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,50)}}()),b.CollectionView=Backbone.CollectionView.extend({tagName:"div",className:"dataflow-cards",itemView:b.View,prepend:!0,initialize:function(){Backbone.CollectionView.prototype.initialize.apply(this,arguments);var a=function(b){window.requestAnimationFrame(a),this.collection.each(function(a){a.view&&a.view.animate(b)})}.bind(this);a()},bringToTop:function(a){this.$el.prepend(a.view.el)}})}(Dataflow),function(a){var b=Backbone.Model.extend({defaults:{label:"",icon:"",action:null}}),c=Backbone.Collection.extend({model:b}),d=a.prototype.module("card"),e=a.prototype.module("menucard");e.Model=d.Model.extend({initialize:function(){this.menu=new c,d.Model.prototype.initialize.call(this)}})}(Dataflow),function(a){var b=a.prototype.module("card"),c=a.prototype.module("menucard"),d=Backbone.View.extend({tagName:"li",template:'',events:{click:"clicked"},render:function(){this.$el.html(_.template(this.template,this.model.toJSON()))},clicked:function(){this.model.get("action")&&this.model.get("action")()}});c.View=b.View.extend({initialize:function(){this.model.set("card",new Backbone.CollectionView({tagName:"ul",className:"dataflow-menu",collection:this.model.menu,itemView:d})),b.View.prototype.initialize.call(this)}})}(Dataflow),function(a){var b=a.prototype.module("node"),c='

<%- label %>

<%- type %>

',d=function(a,b,c){a[0].contentEditable=!0;var d=a.text(),e=function(){b.set(c,a.text())},f=function(){a.text(d)};a.focus(function(){d=a.text()}).blur(function(){e()}).keydown(function(b){27===b.which?(f(),a.blur()):13===b.which&&a.blur()})};b.InspectView=Backbone.View.extend({template:_.template(c),className:"dataflow-node-inspector",events:{},initialize:function(){this.$el.html(this.template(this.model.toJSON()));var a=this.$el.children(".dataflow-node-inspector-inputs");this.model.inputs.each(function(b){b.view&&b.view.$input&&a.append(b.view.$input)},this),d(this.$(".dataflow-node-inspector-label"),this.model,"label")},render:function(){return this},removeModel:function(){this.model.remove()}})}(Dataflow),function(a){var b=a.prototype.module("edge"),c='

Edge

<%= id %>

    ';b.InspectView=Backbone.View.extend({tagName:"div",className:"dataflow-edge-inspector",positions:null,template:_.template(c),initialize:function(){var a=this.model.toJSON();this.model.id&&(a.id=this.model.id.replace("->","→")),this.$el.html(this.template(a));var b=this.$el.children(".dataflow-edge-inspector-route-choose");this.$log=this.$el.children(".dataflow-edge-inspector-events");for(var c=function(a){var b=$(a.target).data("route");this.model.set("route",b)}.bind(this),d=0;12>d;d++){var e=$("



    ');h.children(".selectall").click(c),b.selectAll=c,b.removeSelected=function(){var b=a.currentGraph.nodes.where({selected:!0});_.each(b,function(a){a.remove()})},h.children(".cut").click(d),b.cut=d,b.removeEdge=e;var i={};h.children(".copy").click(f),b.copy=f,h.children(".paste").click(g),b.paste=g,a.addContext({id:"cut",icon:"cut",label:"cut",action:d,contexts:["node","nodes"]}),a.addContext({id:"copy",icon:"copy",label:"copy",action:f,contexts:["node","nodes"]}),a.addContext({id:"paste",icon:"paste",label:"paste",action:g,contexts:["node","nodes"]}),a.addContext({id:"edgeRemove",icon:"remove",label:"remove edge",action:e,contexts:["edge"]}),a.addContext({id:"edgeRemove",icon:"remove",label:"remove edges",action:e,contexts:["edges"]}),b.onSearch=function(b,c){if(a.currentGraph){var d=[];a.currentGraph.nodes.each(function(a){-1!==a.get("label").toLowerCase().indexOf(b.toLowerCase())&&d.push({source:"edit",icon:"sign-blank",label:a.get("label"),description:a.type,action:function(){a.view.select()}})}),c(d)}}}}(Dataflow),function(a){var b=a.prototype.plugin("elements");b.list=[{type:"div",attributes:["id","class","style"],events:["pointermove","pointerover","pointerout"]},{type:"button",attributes:["id","class","style"],events:["pointerdown","pointerup"]}]}(Dataflow),function(a){var b=a.prototype.plugin("library");b.initialize=function(a){var c=$('
    '),d=$('
      ');c.append(d),b.excluded=["base","base-resizable"];var e=function(b,c,d){return function(){a.currentGraph.view.$(".dataflow-node").removeClass("ui-selected"),zoom=a.currentGraph.get("zoom");for(var e=1;a.currentGraph.nodes.get(e);)e++;c=void 0===c?200:c,d=void 0===d?200:d,c=c/zoom-a.currentGraph.get("panX"),d=d/zoom-a.currentGraph.get("panY");var f=new b.Model({id:e,x:c,y:d,parentGraph:a.currentGraph});a.currentGraph.nodes.add(f),f.view.select()}},f='
    • <%- name %><%-description %>
    • ',g=function(b,c){var g=$(_.template(f,{name:b,description:c.description}));$(".button",g).attr("title","click or drag").draggable({helper:function(){var c=$('
      '+b+"
      ");return a.$el.append(c),c},stop:function(a,b){e(c,b.position.left,b.position.top).call()}}).click(e(c)),d.append(g)},h=function(c){c=c?c:{},b.excluded=c.exclude?c.exclude:b.excluded,d.empty();var e=_.sortBy(Object.keys(a.nodes),function(a){return a});_.each(e,function(c){-1===b.excluded.indexOf(c)&&g(c,a.nodes[c])})};h(),a.addPlugin({id:"library",label:"library",name:"",menu:c,icon:"plus",pinned:!1}),b.update=h,b.onSearch=function(c,d){var f=[];_.each(a.nodes,function(a,d){-1===b.excluded.indexOf(d)&&-1!==d.toLowerCase().indexOf(c.toLowerCase())&&f.push({source:"library",icon:"plus",action:function(){e(a).call()},label:d,description:a.description})}),d(f)}}}(Dataflow),function(a){var b=a.prototype.plugin("source");b.updateAllowed=!0,b.initialize=function(a){var c=$('

      '),d=c.find(".code");a.addPlugin({id:"source",label:"view source",name:"",menu:c,icon:"code",pinned:!0}),b.show=function(a){var b=d.prop("scrollTop");d.val(a),d.scrollTop(b)};var e=function(){a.graph&&b.show(JSON.stringify(a.graph.toJSON(),null," "))};b.listeners=function(b){b?a.on("change",e):a.off("change",e)},b.listeners(!0),b.allowUpdate=function(a){var e=c.find(".apply");return a?(b.updateAllowed=!0,e.show(),d.removeAttr("readonly"),void 0):(b.updateAllowed=!1,e.hide(),d.attr("readonly","readonly"),void 0)},c.submit(function(){return b.updateGraph(d,a),!1})},b.updateGraph=function(a,c){if(b.updateAllowed){var d;try{d=JSON.parse(a.val())}catch(e){return c.log("Invalid JSON"),!1}if(d){var f=c.loadGraph(d);f.trigger("change")}}}}(Dataflow),function(a){var b=a.prototype.plugin("log");b.initialize=function(a){function c(a){a=_.escape(a),d.children(".loglist").append("
    • "+a+"
    • "),d.scrollTop(d.prop("scrollHeight"))}var d=$('
        ');a.addPlugin({id:"log",label:"log",name:"",menu:d,icon:"th-list",pinned:!0}),b.add=c;var e=function(a){c("log: "+a)},f=function(a,b){c("node added: "+b.toString())},g=function(a,b){c("node removed: "+b.toString())},h=function(a,b){c("edge added: "+b.toString())},i=function(a,b){c("edge removed: "+b.toString())};b.listeners=function(b){b?(a.on("log",e),a.on("node:add",f),a.on("node:remove",g),a.on("edge:add",h),a.on("edge:remove",i)):(a.off("log",e),a.off("node:add",f),a.off("node:remove",g),a.off("edge:add",h),a.off("edge:remove",i))},b.listeners(!0)}}(Dataflow),function(a){var b=a.prototype.plugin("inspector");b.initialize=function(a){function b(){var b=a.currentGraph.nodes.where({selected:!0});b.forEach(function(b){var c=b.view.getInspector();c.set("pinned",!0),a.addCard(c)});var c=a.currentGraph.edges.where({selected:!0});c.forEach(function(b){var c=b.view.getInspector();c.set("pinned",!0),a.addCard(c)})}a.addContext({id:"inspector",icon:"info-sign",label:"inspect",action:b,contexts:["one","twoplus"]})}}(Dataflow),function(a){var b=a.prototype.plugin("keybinding"),c=a.prototype.plugin("edit");b.initialize=function(a){function d(){a&&a.currentGraph&&a.currentGraph.view&&a.currentGraph.view.zoomIn()}function e(){a&&a.currentGraph&&a.currentGraph.view&&a.currentGraph.view.zoomOut()}function f(){a&&a.currentGraph&&a.currentGraph.view&&a.currentGraph.view.zoomCenter()}function g(a){if("TEXTAREA"!==a.target.tagName&&"INPUT"!==a.target.tagName&&"true"!==a.target.contentEditable&&(a.ctrlKey||a.metaKey))switch(a.which){case 189:a.preventDefault(),d();break;case 187:a.preventDefault(),e();break;case 48:a.preventDefault(),f();break;case 65:c.selectAll();break;case 88:c.cut();break;case 67:c.copy();break;case 86:c.paste();break;case 90:}}b.listeners=function(a){a?$(document).on("keydown",g):$(document).off("keydown",g)},b.listeners(!0)}}(Dataflow),function(a){var b=a.prototype.plugin("notification"),c=window.webkitNotifications?!0:!1;b.requestPermission=function(){c&&(b.hasPermission()||window.webkitNotifications.requestPermission())},b.hasPermission=function(){return c?0!==window.webkitNotifications.checkPermission()?!1:!0:!1},b.notify=function(a,c,d){if(!b.hasPermission()){if(!console||!console.log)return;return console.log(c+": "+d),void 0}var e=window.webkitNotifications.createNotification(a,c,d);e.show()}}(Dataflow),function(a){var b=a.prototype.plugin("search"),c=Backbone.Model.extend({defaults:{source:"",icon:"",action:null,label:"",description:""}}),d=Backbone.Collection.extend({model:c,initialize:function(a,b){b||(b={}),this.search=b.search}}),e=Backbone.View.extend({tagName:"li",template:'<%- label %><%- description %>',events:{click:"clicked"},render:function(){this.$el.html(_.template(this.template,this.model.toJSON()))},clicked:function(){this.model.get("action")&&this.model.get("action")()}});b.initialize=function(a){var c=$(''),d=c.find("input"),e=c.find("button");a.$el.prepend(c),d.on("keyup search webkitspeechchange",function(){return d.val()?(b.search(d.val(),a),void 0):(a.removeCard("searchresults"),void 0)}),e.on("click",function(){a.showPlugin("menu")})},b.search=function(c,f){var g=a.prototype.module("card"),h=new d([],{search:c}),i=new Backbone.CollectionView({tagName:"ul",className:"dataflow-plugin-search-results",collection:h});i.itemView=e;var j=new g.Model({id:"searchresults",dataflow:f,card:i,pinned:!1});h.on("add",function(){f.addCard(j)}),b.results=h,_.each(f.plugins,function(a){a.onSearch&&b.searchPlugin(h,c,a)})},b.searchPlugin=function(a,c,d){d.onSearch(c,function(d){c===b.results.search&&d.forEach(function(b){a.add(b)})})}}(Dataflow),function(a){var b=a.prototype.module("node"),c=a.prototype.node("base");c.Model=b.Model.extend({defaults:function(){var a=b.Model.prototype.defaults.call(this);return a.type="base",a},initialize:function(){b.Model.prototype.initialize.call(this)},unload:function(){},inputs:[],outputs:[]}),c.View=b.View.extend({})}(Dataflow),function(a){var b=a.prototype.node("base"),c=a.prototype.node("base-resizable");c.Model=b.Model.extend({defaults:function(){var a=b.Model.prototype.defaults.call(this);return a.type="base-resizable",a.w=200,a.h=200,a},initialize:function(){b.Model.prototype.initialize.call(this)},unload:function(){},toJSON:function(){var a=b.Model.prototype.toJSON.call(this);return a.w=this.get("w"),a.h=this.get("h"),a},inputs:[],outputs:[]}),c.View=b.View.extend({initialize:function(a){b.View.prototype.initialize.call(this,a),this.$el.css({width:this.model.get("w"),height:this.model.get("h")});var c=this;this.$el.resizable({helper:"dataflow-node helper",minHeight:100,minWidth:120,stop:function(a,b){c.resizeStop(a,b)}})},resizeStop:function(a,b){this.model.set({w:b.size.width,h:b.size.height})}})}(Dataflow),function(a){var b=a.prototype.node("base-resizable"),c=a.prototype.node("dataflow-subgraph"),d=a.prototype.module("graph"),e=a.prototype.module("input"),f=a.prototype.module("output");c.Model=b.Model.extend({defaults:function(){var a=b.Model.prototype.defaults.call(this);return a.label="subgraph",a.type="dataflow-subgraph",a.graph={nodes:[{id:"1",label:"in",type:"dataflow-input",x:180,y:15},{id:"99",label:"out",type:"dataflow-output",x:975,y:500}]},a},initialize:function(){b.Model.prototype.initialize.call(this);var a=this.get("graph");a.parentNode=this,a.dataflow=this.parentGraph.dataflow,this.graph=new d.Model(a);var c=this.graph.nodes.filter(function(a){return"dataflow-input"===a.type});_.each(c,this.addInput,this);var e=this.graph.nodes.filter(function(a){return"dataflow-output"===a.type});_.each(e,this.addOutput,this),this.graph.nodes.on("add",function(a){"dataflow-input"===a.type?this.addInput(a):"dataflow-output"===a.type&&this.addOutput(a)},this),this.graph.nodes.on("remove",function(a){"dataflow-input"===a.type?this.removeInput(a):"dataflow-output"===a.type&&this.removeOutput(a)},this)},addInput:function(a){var b=new e.Model({id:a.id,label:a.get("label"),type:a.get("input-type"),parentNode:this,inputNode:a});this.inputs.add(b)},recieve:function(a,b){var c=this.inputs.get(a).get("inputNode");c&&c.send("data",b)},addOutput:function(a){var b=new f.Model({id:a.id,label:a.get("label"),type:a.get("output-type"),parentNode:this,outputNode:a});this.outputs.add(b),a.set("parentNode",this)},removeInput:function(a){var b=this.inputs.get(a.id);b.remove(),this.inputs.remove(b)},removeOutput:function(a){var b=this.outputs.get(a.id);b.remove(),this.outputs.remove(b)},toJSON:function(){var a=b.Model.prototype.toJSON.call(this);return a.graph=this.graph,a},remove:function(){b.Model.prototype.remove.call(this),this.graph.remove()},inputs:[],outputs:[]});var g='';c.View=b.View.extend({events:function(){var a=b.View.prototype.events.call(this);return a["click .show-subgraph"]="showSubgraph",a},innerTemplate:_.template(g),initialize:function(a){b.View.prototype.initialize.call(this,a),this.model.graph.view=new d.View({model:this.model.graph}),this.model.inputs.each(this.addInput,this),this.model.inputs.on("add",this.addInput,this),this.model.outputs.each(this.addOutput,this),this.model.outputs.on("add",this.addOutput,this)},addInput:function(a){a.get("inputNode")&&a.get("inputNode").on("change:label",function(b){a.view.$(".label").text(b.get("label")) -},this)},addOutput:function(a){a.get("outputNode")&&a.get("outputNode").on("change:label",function(b){a.view.$(".label").text(b.get("label"))},this)},showSubgraph:function(){this.model.graph.dataflow.showGraph(this.model.graph)}})}(Dataflow); +}},_holePosition:null,holePosition:function(){if(!this._holePosition){this.parent||(this.parent=this.options.parent);var a=this.parent.model,b=a.parentGraph;this.parent.graph.$el;var c=this.$el.index(),d=b.get("panX")+a.get("x")+18,e=b.get("panY")+a.get("y")+48+20*c;this._holePosition={left:d,top:e}}return this._holePosition},isConnected:!1,plugSetActive:function(){try{this.$(".dataflow-port-plug").draggable("enable")}catch(a){}this.$(".dataflow-port-plug, .dataflow-port-hole").addClass("active"),this.isConnected=!0},plugCheckActive:function(){var a,b=-1;if(this.model.parentNode.parentGraph.edges.each(function(c){if(c.target===this.model){var d=c.get("z");d>b&&(a=c,b=d)}},this),a)this.bringToTop(a);else{try{this.$(".dataflow-port-plug").draggable("disable")}catch(c){}this.$(".dataflow-port-plug, .dataflow-port-hole").removeClass("active"),this.isConnected=!1}},topRoute:0,bringToTop:function(a){var b=a.get("route");void 0!==b&&(this.$(".dataflow-port-hole, .dataflow-port-plug").removeClass("route"+this.topRoute),this.$(".dataflow-port-hole, .dataflow-port-plug").addClass("route"+b),this.topRoute=b)}}),b.CollectionView=Backbone.CollectionView.extend({tagName:"ul",itemView:b.View})}(Dataflow),function(a){var b=a.prototype.module("output"),c=a.prototype.module("edge"),d='<%= label %>',e=1;b.View=Backbone.View.extend({template:_.template(d),tagName:"li",className:"dataflow-port dataflow-out",events:{click:"getTopEdge",drop:"connectEdge","dragstart .dataflow-port-hole":"newEdgeStart","drag .dataflow-port-hole":"newEdgeDrag","dragstop .dataflow-port-hole":"newEdgeStop","dragstart .dataflow-port-plug":"changeEdgeStart","drag .dataflow-port-plug":"changeEdgeDrag","dragstop .dataflow-port-plug":"changeEdgeStop"},initialize:function(a){this.$el.html(this.template(this.model.toJSON())),this.$el.addClass(this.model.get("type")),this.parent=a.parent;var b=this.parent.model,c=b.parentGraph;if(this.listenTo(b,"change:x change:y change:w",function(){this._holePosition=null}.bind(this)),this.listenTo(c,"change:panX change:panY",function(){this._holePosition=null}.bind(this)),this.model.parentNode.parentGraph.dataflow.editable){var d=this;this.$(".dataflow-port-plug").draggable({cursor:"pointer",helper:function(){var a=$('');return d.parent.graph.$el.append(a),a},disabled:!0,distance:10,delay:100}),this.$(".dataflow-port-hole").draggable({cursor:"pointer",helper:function(){var a=$('').data({port:d.model});return d.parent.graph.$el.append(a),a}}),this.$el.droppable({accept:".dataflow-port-plug.out, .dataflow-port-hole.in",activeClassType:"droppable-hover"})}},render:function(){return this},newEdgeStart:function(a,b){if(a.stopPropagation(),b){b.helper.data({route:this.topRoute}),this.previewEdge=new c.Model({source:{node:this.model.parentNode.id,port:this.model.id},parentGraph:this.model.parentNode.parentGraph,preview:!0,route:this.topRoute}),this.previewEdgeView=new c.View({model:this.previewEdge});var d=this.model.parentNode.parentGraph.view.$(".dataflow-svg-edges")[0];d.appendChild(this.previewEdgeView.el),e=this.model.parentNode.parentGraph.get("zoom"),this.model.parentNode.parentGraph.view.startHighlightCompatible(this.model)}},newEdgeDrag:function(a,b){if(a.stopPropagation(),this.previewEdgeView&&b){b.position.top=a.clientY/e,b.position.left=a.clientX/e;var c=this.model.parentNode.parentGraph.view.el;b.position.left+=c.scrollLeft,b.position.top+=c.scrollTop,this.previewEdgeView.render({left:b.position.left-c.scrollLeft,top:b.position.top-c.scrollTop})}},newEdgeStop:function(a){a.stopPropagation(),this.previewEdgeView.remove(),delete this.previewEdge,delete this.previewEdgeView,this.model.parentNode.parentGraph.view.stopHighlightCompatible(this.model)},getTopEdge:function(){var a,b=-1;return this.isConnected&&(this.model.parentNode.parentGraph.edges.each(function(c){var d=c.get("z");c.source===this.model&&d>b&&(a=c,b=d),c.view&&c.view.unhighlight()},this),a&&a.view&&a.view.bringToTop()),a},changeEdgeStart:function(a,b){if(b&&(a.stopPropagation(),this.isConnected)){var d=this.getTopEdge();if(d){d.remove(),b&&b.helper.data({port:d.target,route:d.get("route")}),this.previewEdgeChange=new c.Model({target:d.get("target"),route:d.get("route"),parentGraph:this.model.parentNode.parentGraph,preview:!0}),this.previewEdgeChangeView=new c.View({model:this.previewEdgeChange});var f=this.model.parentNode.parentGraph.view.$(".dataflow-svg-edges")[0];f.appendChild(this.previewEdgeChangeView.el),e=this.model.parentNode.parentGraph.get("zoom")}}},changeEdgeDrag:function(a,b){b&&(a.stopPropagation(),this.previewEdgeChange&&(this.previewEdgeChangeView.render(b.offset),this.model.parentNode.parentGraph.view.sizeSVG()))},changeEdgeStop:function(a){a.stopPropagation(),this.previewEdgeChange&&(this.previewEdgeChangeView.remove(),delete this.previewEdgeChange,delete this.previewEdgeChangeView)},blur:function(){this.$el.addClass("blur")},unblur:function(){this.$el.removeClass("blur")},connectEdge:function(a,b){var c=b.helper.data("port"),d=this.model.parentNode.parentGraph.edges.length;if(c.parentNode.parentGraph.dataflow!==this.model.parentNode.parentGraph.dataflow)return!1;if(this.model.canConnect()){var e=0;void 0!==b.helper.data("route")&&(e=b.helper.data("route")),this.model.parentNode.parentGraph.edges.add({id:this.model.parentNode.id+":"+this.model.id+"::"+c.parentNode.id+":"+c.id,parentGraph:this.model.parentNode.parentGraph,source:{node:this.model.parentNode.id,port:this.model.id},target:{node:c.parentNode.id,port:c.id},route:e}),b.helper.data("removeChangeEdge",db&&(a=c,b=d)}},this),a)this.bringToTop(a);else{try{this.$(".dataflow-port-plug").draggable("disable")}catch(c){}this.$(".dataflow-port-plug, .dataflow-port-hole").removeClass("active"),this.isConnected=!1}},topRoute:0,bringToTop:function(a){var b=a.get("route");void 0!==b&&(this.$(".dataflow-port-hole").removeClass("route"+this.topRoute),this.$(".dataflow-port-hole").addClass("route"+b),this.topRoute=b)}}),b.CollectionView=Backbone.CollectionView.extend({tagName:"ul",itemView:b.View})}(Dataflow),function(a){var b=a.prototype.module("edge"),c=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)"xlink:href"===d?c.setAttributeNS("http://www.w3.org/1999/xlink","href",b[d]):c.setAttribute(d,b[d]);return c},d=function(a,b){a.classList?a.classList.add(b):a.className="dataflow-edge "+b},e=function(a,b){a.classList?a.classList.remove(b):a.className="dataflow-edge"};b.View=Backbone.View.extend({tagName:"div",className:"dataflow-edge",positions:null,initialize:function(){this.positions={from:null,to:null},this.model.source&&this.model.source.parentNode.on("change:x change:y change:w",this.render,this),this.model.target&&this.model.target.parentNode.on("change:x change:y",this.render,this),this.model.source&&this.model.source.view&&(this.model.source.view.plugSetActive(),this.model.source.view.bringToTop(this.model)),this.model.target&&this.model.target.view&&(this.model.target.view.plugSetActive(),this.model.target.view.bringToTop(this.model)),this.el=c("g",{"class":"dataflow-edge"}),this.elEdge=c("path",{"class":"dataflow-edge-wire"}),this.elShadow=c("path",{"class":"dataflow-edge-shadow"}),void 0!==this.model.get("route")&&this.elEdge.setAttribute("class","dataflow-edge-wire route"+this.model.get("route"));var a=this;this.model.on("change:route",function(){a.elEdge.setAttribute("class","dataflow-edge-wire route"+a.model.get("route")),a.bringToTop()}),this.el.appendChild(this.elShadow),this.el.appendChild(this.elEdge),this.el.addEventListener("click",function(b){a.click(b)}),this.listenTo(this.model,"change:selected",this.selectedChange),this.listenTo(this.model,"remove",this.hideInspector)},render:function(a){var b,c=this.model.source,d=this.model.target;c?this.positions.from=c.view.holePosition():(b=this.model.parentGraph.dataflow.$el.parent().position(),graph=this.model.parentGraph.view.$el,this.positions.from={left:graph.scrollLeft()+a.left-5-b.left,top:graph.scrollTop()+a.top+5-b.top}),d?this.positions.to=d.view.holePosition():(b=this.model.parentGraph.dataflow.$el.parent().position(),graph=this.model.parentGraph.view.$el,this.positions.to={left:graph.scrollLeft()+a.left+15-b.left,top:graph.scrollTop()+a.top+5-b.top});var e=this.edgePath(this.positions);this.elEdge.setAttribute("d",e),this.elShadow.setAttribute("d",e),this.model.parentGraph&&this.model.parentGraph.view&&this.model.parentGraph.view.sizeSVG()},fade:function(){this.model.source.parentNode.get("selected")||this.model.target.parentNode.get("selected")||d(this.el,"fade")},unfade:function(){e(this.el,"fade")},selectedChange:function(){this.model.get("selected")?(this.highlight(),this.showInspector()):(this.unhighlight(),this.hideInspector()),this.model.parentGraph.trigger("selectionChanged")},highlight:function(){d(this.el,"highlight")},unhighlight:function(){e(this.el,"highlight")},edgePath:function(a){var b=20,c=a.to.left-b-(a.from.left+b),d=Math.floor(c/2),e=c-d,f=a.to.top-a.from.top,g=Math.floor(f/2),h=f-g,i="",j="";return Math.abs(f)>Math.abs(c)?f>0?c>0?(i=" L "+(a.from.left+b+d)+" "+(a.from.top+d),j=" L "+(a.to.left-b-e)+" "+(a.to.top-e)):0>c&&(i=" L "+(a.from.left+b+d)+" "+(a.from.top-d),j=" L "+(a.to.left-b-e)+" "+(a.to.top+e)):0>f&&(c>0?(i=" L "+(a.from.left+b+d)+" "+(a.from.top-d),j=" L "+(a.to.left-b-e)+" "+(a.to.top+e)):0>c&&(i=" L "+(a.from.left+b+d)+" "+(a.from.top+d),j=" L "+(a.to.left-b-e)+" "+(a.to.top-e))):Math.abs(f)0?f>0?(i=" L "+(a.from.left+b+g)+" "+(a.from.top+g),j=" L "+(a.to.left-b-h)+" "+(a.to.top-h)):0>f&&(i=" L "+(a.from.left+b-g)+" "+(a.from.top+g),j=" L "+(a.to.left-b+h)+" "+(a.to.top-h)):0>c&&(f>0?(i=" L "+(a.from.left+b-g)+" "+(a.from.top+g),j=" L "+(a.to.left-b+h)+" "+(a.to.top-h)):0>f&&(i=" L "+(a.from.left+b+g)+" "+(a.from.top+g),j=" L "+(a.to.left-b-h)+" "+(a.to.top-h)))),"M "+a.from.left+" "+a.from.top+" L "+(a.from.left+b)+" "+a.from.top+i+j+" L "+(a.to.left-b)+" "+a.to.top+" L "+a.to.left+" "+a.to.top},remove:function(){var a=this.model.source,b=this.model.target;a&&a.parentNode.off(null,null,this),b&&b.parentNode.off(null,null,this),a&&a.view.plugCheckActive(),b&&b.view.plugCheckActive(),this.el.parentNode.removeChild(this.el)},click:function(a){a&&a.stopPropagation();var b;a&&(a.ctrlKey||a.metaKey)?(b=this.model.get("selected"),b=!b):(b=!0,this.model.parentGraph.nodes.invoke("set",{selected:!1}),this.model.collection.invoke("set",{selected:!1})),this.model.set({selected:b}),b&&(this.bringToTop(),this.model.trigger("select"),this.unfade()),this.model.parentGraph.view.fade()},bringToTop:function(){this.model.bringToTop();var a=this.el.parentNode;a&&a.appendChild(this.el),this.model.source.view.bringToTop(this.model),this.model.target.view.bringToTop(this.model)},inspector:null,getInspector:function(){if(!this.inspector){var c=new b.InspectView({model:this.model}),d=a.prototype.module("card");this.inspector=new d.Model({dataflow:this.model.parentGraph.dataflow,card:c})}return this.inspector},showInspector:function(a){this.model.parentGraph.dataflow.addCard(this.getInspector(),a)},hideInspector:function(){this.model.parentGraph.dataflow.removeCard(this.getInspector())}})}(Dataflow),function(a){var b=a.prototype.module("card");b.Model=Backbone.Model.extend({defaults:{pinned:!1},initialize:function(){this.dataflow=this.get("dataflow")},hide:function(){this.dataflow.shownCards.remove(this)}}),b.Collection=Backbone.Collection.extend({model:b.Model})}(Dataflow),function(a){var b=a.prototype.module("card"),c='
        ';b.View=Backbone.View.extend({tagName:"div",className:"dataflow-card",template:_.template(c),events:{"click .dataflow-card-pin":"togglePin","click .dataflow-card-close":"hide"},initialize:function(){this.$el.html(this.template()),this.card=this.model.get("card"),this.$el.append(this.card.el),this.listenTo(this.model,"change:pinned",this.pinnedChanged),this.pinnedChanged()},animate:function(a){"function"==typeof this.card.animate&&this.card.animate(a)},togglePin:function(){var a=!this.model.get("pinned");this.model.set("pinned",a),a||this.hide()},pinnedChanged:function(){this.model.get("pinned")?this.$(".dataflow-card-pin").addClass("active"):this.$(".dataflow-card-pin").removeClass("active")},hide:function(){this.model.hide()},remove:function(){this.$el.detach()}}),window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,50)}}()),b.CollectionView=Backbone.CollectionView.extend({tagName:"div",className:"dataflow-cards",itemView:b.View,prepend:!0,initialize:function(){Backbone.CollectionView.prototype.initialize.apply(this,arguments);var a=function(b){window.requestAnimationFrame(a),this.collection.each(function(a){a.view&&a.view.animate(b)})}.bind(this);a()},bringToTop:function(a){this.$el.prepend(a.view.el)}})}(Dataflow),function(a){var b=Backbone.Model.extend({defaults:{label:"",icon:"",action:null}}),c=Backbone.Collection.extend({model:b}),d=a.prototype.module("card"),e=a.prototype.module("menucard");e.Model=d.Model.extend({initialize:function(){this.menu=new c,d.Model.prototype.initialize.call(this)}})}(Dataflow),function(a){var b=a.prototype.module("card"),c=a.prototype.module("menucard"),d=Backbone.View.extend({tagName:"li",template:'',events:{click:"clicked"},render:function(){this.$el.html(_.template(this.template,this.model.toJSON()))},clicked:function(){this.model.get("action")&&this.model.get("action")()}});c.View=b.View.extend({initialize:function(){this.model.set("card",new Backbone.CollectionView({tagName:"ul",className:"dataflow-menu",collection:this.model.menu,itemView:d})),b.View.prototype.initialize.call(this)}})}(Dataflow),function(a){var b=a.prototype.module("node"),c='

        <%- label %>

        <%- type %>

        ',d=function(a,b,c){a[0].contentEditable=!0;var d=a.text(),e=function(){b.set(c,a.text())},f=function(){a.text(d)};a.focus(function(){d=a.text()}).blur(function(){e()}).keydown(function(b){27===b.which?(f(),a.blur()):13===b.which&&a.blur()})};b.InspectView=Backbone.View.extend({template:_.template(c),className:"dataflow-node-inspector",events:{},initialize:function(){this.$el.html(this.template(this.model.toJSON()));var a=this.$el.children(".dataflow-node-inspector-inputs");this.model.inputs.each(function(b){b.view&&b.view.$input&&a.append(b.view.$input)},this),d(this.$(".dataflow-node-inspector-label"),this.model,"label")},render:function(){return this},removeModel:function(){this.model.remove()}})}(Dataflow),function(a){var b=a.prototype.module("edge"),c='

        Edge

        <%= id %>

          ';b.InspectView=Backbone.View.extend({tagName:"div",className:"dataflow-edge-inspector",positions:null,template:_.template(c),initialize:function(){var a=this.model.toJSON();this.model.id&&(a.id=this.model.id.replace("->","→")),this.$el.html(this.template(a));var b=this.$el.children(".dataflow-edge-inspector-route-choose");this.$log=this.$el.children(".dataflow-edge-inspector-events");for(var c=function(a){var b=$(a.target).data("route");this.model.set("route",b)}.bind(this),d=0;12>d;d++){var e=$("



        ');h.children(".selectall").click(c),b.selectAll=c,b.removeSelected=function(){var b=a.currentGraph.nodes.where({selected:!0});_.each(b,function(a){a.remove()})},h.children(".cut").click(d),b.cut=d,b.removeEdge=e;var i={};h.children(".copy").click(f),b.copy=f,h.children(".paste").click(g),b.paste=g,a.addContext({id:"cut",icon:"cut",label:"cut",action:d,contexts:["node","nodes"]}),a.addContext({id:"copy",icon:"copy",label:"copy",action:f,contexts:["node","nodes"]}),a.addContext({id:"paste",icon:"paste",label:"paste",action:g,contexts:["node","nodes"]}),a.addContext({id:"edgeRemove",icon:"remove",label:"remove edge",action:e,contexts:["edge"]}),a.addContext({id:"edgeRemove",icon:"remove",label:"remove edges",action:e,contexts:["edges"]}),b.onSearch=function(b,c){if(a.currentGraph){var d=[];a.currentGraph.nodes.each(function(a){-1!==a.get("label").toLowerCase().indexOf(b.toLowerCase())&&d.push({source:"edit",icon:"sign-blank",label:a.get("label"),description:a.type,action:function(){a.view.select()}})}),c(d)}}}}(Dataflow),function(a){var b=a.prototype.plugin("elements");b.list=[{type:"div",attributes:["id","class","style"],events:["pointermove","pointerover","pointerout"]},{type:"button",attributes:["id","class","style"],events:["pointerdown","pointerup"]}]}(Dataflow),function(a){var b=a.prototype.plugin("library");b.initialize=function(a){var c=$('
        '),d=$('
          ');c.append(d),b.excluded=["base","base-resizable"];var e=function(b,c,d){return function(){a.currentGraph.view.$(".dataflow-node").removeClass("ui-selected"),zoom=a.currentGraph.get("zoom");for(var e=1;a.currentGraph.nodes.get(e);)e++;c=void 0===c?200:c,d=void 0===d?200:d,c=c/zoom-a.currentGraph.get("panX"),d=d/zoom-a.currentGraph.get("panY");var f=new b.Model({id:e,x:c,y:d,parentGraph:a.currentGraph});a.currentGraph.nodes.add(f),f.view.select()}},f='
        • <%- name %><%-description %>
        • ',g=function(b,c){var g=$(_.template(f,{name:b,description:c.description}));$(".button",g).attr("title","click or drag").draggable({helper:function(){var c=$('
          '+b+"
          ");return a.$el.append(c),c},stop:function(a,b){e(c,b.position.left,b.position.top).call()}}).click(e(c)),d.append(g)},h=function(c){c=c?c:{},b.excluded=c.exclude?c.exclude:b.excluded,d.empty();var e=_.sortBy(Object.keys(a.nodes),function(a){return a});_.each(e,function(c){-1===b.excluded.indexOf(c)&&g(c,a.nodes[c])})};h(),a.addPlugin({id:"library",label:"library",name:"",menu:c,icon:"plus",pinned:!1}),b.update=h,b.onSearch=function(c,d){var f=[];_.each(a.nodes,function(a,d){-1===b.excluded.indexOf(d)&&-1!==d.toLowerCase().indexOf(c.toLowerCase())&&f.push({source:"library",icon:"plus",action:function(){e(a).call()},label:d,description:a.description})}),d(f)}}}(Dataflow),function(a){var b=a.prototype.plugin("source");b.updateAllowed=!0,b.initialize=function(a){var c=$('

          '),d=c.find(".code");a.addPlugin({id:"source",label:"view source",name:"",menu:c,icon:"code",pinned:!0}),b.show=function(a){var b=d.prop("scrollTop");d.val(a),d.scrollTop(b)};var e=function(){a.graph&&b.show(JSON.stringify(a.graph.toJSON(),null," "))};b.listeners=function(b){b?a.on("change",e):a.off("change",e)},b.listeners(!0),b.allowUpdate=function(a){var e=c.find(".apply");return a?(b.updateAllowed=!0,e.show(),d.removeAttr("readonly"),void 0):(b.updateAllowed=!1,e.hide(),d.attr("readonly","readonly"),void 0)},c.submit(function(){return b.updateGraph(d,a),!1})},b.updateGraph=function(a,c){if(b.updateAllowed){var d;try{d=JSON.parse(a.val())}catch(e){return c.log("Invalid JSON"),!1}if(d){var f=c.loadGraph(d);f.trigger("change")}}}}(Dataflow),function(a){var b=a.prototype.plugin("log");b.initialize=function(a){function c(a){a=_.escape(a),d.children(".loglist").append("
        • "+a+"
        • "),d.scrollTop(d.prop("scrollHeight"))}var d=$('
            ');a.addPlugin({id:"log",label:"log",name:"",menu:d,icon:"th-list",pinned:!0}),b.add=c;var e=function(a){c("log: "+a)},f=function(a,b){c("node added: "+b.toString())},g=function(a,b){c("node removed: "+b.toString())},h=function(a,b){c("edge added: "+b.toString())},i=function(a,b){c("edge removed: "+b.toString())};b.listeners=function(b){b?(a.on("log",e),a.on("node:add",f),a.on("node:remove",g),a.on("edge:add",h),a.on("edge:remove",i)):(a.off("log",e),a.off("node:add",f),a.off("node:remove",g),a.off("edge:add",h),a.off("edge:remove",i))},b.listeners(!0)}}(Dataflow),function(a){var b=a.prototype.plugin("inspector");b.initialize=function(a){function b(){var b=a.currentGraph.nodes.where({selected:!0});b.forEach(function(b){var c=b.view.getInspector();c.set("pinned",!0),a.addCard(c)});var c=a.currentGraph.edges.where({selected:!0});c.forEach(function(b){var c=b.view.getInspector();c.set("pinned",!0),a.addCard(c)})}a.addContext({id:"inspector",icon:"info-sign",label:"inspect",action:b,contexts:["one","twoplus"]})}}(Dataflow),function(a){var b=a.prototype.plugin("keybinding"),c=a.prototype.plugin("edit"),d=a.prototype.plugin("search");b.initialize=function(a){function e(){a&&a.currentGraph&&a.currentGraph.view&&a.currentGraph.view.zoomIn()}function f(){a&&a.currentGraph&&a.currentGraph.view&&a.currentGraph.view.zoomOut()}function g(){a&&a.currentGraph&&a.currentGraph.view&&a.currentGraph.view.zoomCenter()}function h(a){if("TEXTAREA"!==a.target.tagName&&"INPUT"!==a.target.tagName&&"true"!==a.target.contentEditable&&(a.ctrlKey||a.metaKey))switch(a.which){case 189:a.preventDefault(),e();break;case 187:a.preventDefault(),f();break;case 48:a.preventDefault(),g();break;case 65:c.selectAll();break;case 88:c.cut();break;case 67:c.copy();break;case 86:c.paste();break;case 90:break;case 83:a.preventDefault(),d.focus()}}b.listeners=function(a){a?$(document).on("keydown",h):$(document).off("keydown",h)},b.listeners(!0)}}(Dataflow),function(a){var b=a.prototype.plugin("notification"),c=window.webkitNotifications?!0:!1;b.requestPermission=function(){c&&(b.hasPermission()||window.webkitNotifications.requestPermission())},b.hasPermission=function(){return c?0!==window.webkitNotifications.checkPermission()?!1:!0:!1},b.notify=function(a,c,d){if(!b.hasPermission()){if(!console||!console.log)return;return console.log(c+": "+d),void 0}var e=window.webkitNotifications.createNotification(a,c,d);e.show()}}(Dataflow),function(a){var b=a.prototype.plugin("search"),c=Backbone.Model.extend({defaults:{source:"",icon:"",action:null,label:"",description:""}}),d=Backbone.Collection.extend({model:c,initialize:function(a,b){b||(b={}),this.search=b.search}}),e=Backbone.View.extend({tagName:"li",template:'<%- label %><%- description %>',events:{click:"clicked"},render:function(){this.$el.html(_.template(this.template,this.model.toJSON()))},clicked:function(){this.model.get("action")&&this.model.get("action")()}});b.initialize=function(a){var c=$(''),d=c.find("input"),e=c.find("button");a.$el.prepend(c),d.on("keyup search webkitspeechchange",function(){return d.val()?(b.search(d.val(),a),void 0):(a.removeCard("searchresults"),void 0)}),e.on("click",function(){a.showPlugin("menu")}),b.focus=function(){d.focus()}},b.search=function(c,f){var g=a.prototype.module("card"),h=new d([],{search:c}),i=new Backbone.CollectionView({tagName:"ul",className:"dataflow-plugin-search-results",collection:h});i.itemView=e;var j=new g.Model({id:"searchresults",dataflow:f,card:i,pinned:!1});h.on("add",function(){f.addCard(j)}),b.results=h,_.each(f.plugins,function(a){a.onSearch&&b.searchPlugin(h,c,a)})},b.searchPlugin=function(a,c,d){d.onSearch(c,function(d){c===b.results.search&&d.forEach(function(b){a.add(b)})})}}(Dataflow),function(a){var b=a.prototype.module("node"),c=a.prototype.node("base");c.Model=b.Model.extend({defaults:function(){var a=b.Model.prototype.defaults.call(this);return a.type="base",a},initialize:function(){b.Model.prototype.initialize.call(this)},unload:function(){},inputs:[],outputs:[]}),c.View=b.View.extend({})}(Dataflow),function(a){var b=a.prototype.node("base"),c=a.prototype.node("base-resizable");c.Model=b.Model.extend({defaults:function(){var a=b.Model.prototype.defaults.call(this);return a.type="base-resizable",a.w=200,a.h=200,a},initialize:function(){b.Model.prototype.initialize.call(this)},unload:function(){},toJSON:function(){var a=b.Model.prototype.toJSON.call(this);return a.w=this.get("w"),a.h=this.get("h"),a},inputs:[],outputs:[]}),c.View=b.View.extend({initialize:function(a){b.View.prototype.initialize.call(this,a),this.$el.css({width:this.model.get("w"),height:this.model.get("h")});var c=this;this.$el.resizable({helper:"dataflow-node helper",minHeight:100,minWidth:120,stop:function(a,b){c.resizeStop(a,b)}})},resizeStop:function(a,b){this.model.set({w:b.size.width,h:b.size.height})}})}(Dataflow),function(a){var b=a.prototype.node("base-resizable"),c=a.prototype.node("dataflow-subgraph"),d=a.prototype.module("graph"),e=a.prototype.module("input"),f=a.prototype.module("output");c.Model=b.Model.extend({defaults:function(){var a=b.Model.prototype.defaults.call(this);return a.label="subgraph",a.type="dataflow-subgraph",a.graph={nodes:[{id:"1",label:"in",type:"dataflow-input",x:180,y:15},{id:"99",label:"out",type:"dataflow-output",x:975,y:500}]},a},initialize:function(){b.Model.prototype.initialize.call(this);var a=this.get("graph");a.parentNode=this,a.dataflow=this.parentGraph.dataflow,this.graph=new d.Model(a);var c=this.graph.nodes.filter(function(a){return"dataflow-input"===a.type});_.each(c,this.addInput,this);var e=this.graph.nodes.filter(function(a){return"dataflow-output"===a.type});_.each(e,this.addOutput,this),this.graph.nodes.on("add",function(a){"dataflow-input"===a.type?this.addInput(a):"dataflow-output"===a.type&&this.addOutput(a)},this),this.graph.nodes.on("remove",function(a){"dataflow-input"===a.type?this.removeInput(a):"dataflow-output"===a.type&&this.removeOutput(a)},this)},addInput:function(a){var b=new e.Model({id:a.id,label:a.get("label"),type:a.get("input-type"),parentNode:this,inputNode:a});this.inputs.add(b)},recieve:function(a,b){var c=this.inputs.get(a).get("inputNode");c&&c.send("data",b)},addOutput:function(a){var b=new f.Model({id:a.id,label:a.get("label"),type:a.get("output-type"),parentNode:this,outputNode:a});this.outputs.add(b),a.set("parentNode",this)},removeInput:function(a){var b=this.inputs.get(a.id);b.remove(),this.inputs.remove(b)},removeOutput:function(a){var b=this.outputs.get(a.id);b.remove(),this.outputs.remove(b)},toJSON:function(){var a=b.Model.prototype.toJSON.call(this);return a.graph=this.graph,a},remove:function(){b.Model.prototype.remove.call(this),this.graph.remove()},inputs:[],outputs:[]});var g='';c.View=b.View.extend({events:function(){var a=b.View.prototype.events.call(this);return a["click .show-subgraph"]="showSubgraph",a},innerTemplate:_.template(g),initialize:function(a){b.View.prototype.initialize.call(this,a),this.model.graph.view=new d.View({model:this.model.graph}),this.model.inputs.each(this.addInput,this),this.model.inputs.on("add",this.addInput,this),this.model.outputs.each(this.addOutput,this),this.model.outputs.on("add",this.addOutput,this) +},addInput:function(a){a.get("inputNode")&&a.get("inputNode").on("change:label",function(b){a.view.$(".label").text(b.get("label"))},this)},addOutput:function(a){a.get("outputNode")&&a.get("outputNode").on("change:label",function(b){a.view.$(".label").text(b.get("label"))},this)},showSubgraph:function(){this.model.graph.dataflow.showGraph(this.model.graph)}})}(Dataflow); //# sourceMappingURL=dataflow.min.js.map \ No newline at end of file diff --git a/build/dataflow.min.js.map b/build/dataflow.min.js.map index 8a02094..aa49559 100644 --- a/build/dataflow.min.js.map +++ b/build/dataflow.min.js.map @@ -1 +1 @@ -{"version":3,"file":"build/dataflow.min.js","sources":["build/dataflow.build.js"],"names":["CircularBuffer","n","this","_array","Array","length","prototype","toString","get","i","undefined","set","v","IndexError","push","App","Backbone","Model","extend","$","query","$el","find","initialize","el","document","createElement","className","data","Card","Dataflow","module","shownCards","Collection","view","CollectionView","collection","append","debug","controls","name","plugins","inputs","editable","appendTo","css","margin","padding","width","height","id","attr","loadState","modules","nodes","node","description","plugin","addCard","card","leaveUnpinned","hideCards","bringToTop","add","removeCard","remove","unpinned","where","pinned","addPlugin","info","enabled","menu","dataflow","icon","label","showLabel","showPlugin","onShow","enablePlugin","disablePlugin","showContextBar","contextBar","show","hideContextBar","hide","contexts","prepareContext","ctx","MenuCard","View","model","addContext","_","each","context","changeContext","selectedNodes","selectedEdges","bind","loadGraph","source","graph","currentGraph","Graph","newGraph","render","showGraph","detach","log","message","trigger","arguments","console","types","window","exports","addEvents","events","delegateEvents","clone","prepend","options","tagName","itemView","parent","addItem","on","removeItem","item","StateModel","stateKey","cid","stateData","JSON","parse","localStorage","getItem","state","stateInstance","setItem","stringify","toJSON","Node","Edge","defaults","edges","panX","panY","zoom","parentGraph","nodesArray","type","edge","edgesArray","port","target","sourceNode","targetNode","outputs","selectionChanged","selectNode","selectEdge","selected","at","Input","Output","x","y","inputArray","parentNode","input","value","outputArray","output","changeSelected","setState","setBang","send","self","defer","recieve","unload","comparator","multiple","connected","canConnect","connect","uniq","disconnect","without","z","route","preview","attributes","e","select","isConnectedToPort","isConnectedToNode","topZ","thisZ","unhighlight","off","minZoom","maxZoom","style","hasOwnProperty","template","click .dataflow-graph","dragstart .dataflow-graph-panzoom","drag .dataflow-graph-panzoom","dragstop .dataflow-graph-panzoom","click .dataflow-graph-gotoparent","mousewheel","html","addNode","removeNode","addEdge","removeEdge","draggable","helper","h","$graphEl","graphEl","transform","transformOrigin","bindInteraction","panStartOffset","panStart","event","ui","offset","pan","scale","deltaX","left","deltaY","top","panStop","tempPanX","tempPanY","setPanDebounce","debounce","mouseWheel","preventDefault","oe","originalEvent","wheelDeltaX","wheelDeltaY","gotoParent","bindZoom","bindScroll","Hammer","currentZoom","startX","startY","originX","originY","distance_to_origin_x","distance_to_origin_y","gesture","center","pageX","pageY","graphOffset","Math","max","min","onZoom","lastClass","zoomClass","removeClass","addClass","zoomIn","zoomOut","zoomCenter","rerenderEdges","CustomType","BaseNode","appendChild","edgeView","sizeSVG","svg","rect","getBBox","round","setAttribute","error","deselect","invoke","unfade","fade","fadeEdges","startHighlightCompatible","fromInput","blur","stopHighlightCompatible","innerTemplate","click .dataflow-node-header","dragstart","drag","dragstop","handle","listenTo","bumpPosition","selectedChanged","changeLabel","hideInspector","$inner","_alsoDrag","_dragDelta","$dragHelpers","dragStart","stopPropagation","parseInt","text","position","originalPosition","dragStop","moveToPosition","empty","silent","removeModel","zIndex","toggle","ctrlKey","metaKey","inspector","getInspector","inspect","InspectView","showInspector","highlight","click","drop","dragstart .dataflow-port-hole","drag .dataflow-port-hole","dragstop .dataflow-port-hole","dragstart .dataflow-port-plug","drag .dataflow-port-plug","dragstop .dataflow-port-plug","$input","_holePosition","nodeState","cursor","disabled","distance","delay","droppable","accept","activeClassType","refreshPositions","isString","split","isArray","o","val","renderInput","setInputValue","option","change","inputSelect","step","inputInt","inputFloat","inputBoolean","inputObject","inputBang","inputString","selectVal","prop","parseFloat","obj","err","newEdgeStart","topRoute","previewEdgeNew","previewEdgeNewView","graphSVGElement","newEdgeDrag","clientY","clientX","df","scrollLeft","scrollTop","newEdgeStop","getTopEdge","topEdge","isConnected","changeEdgeStart","changeEdge","previewEdgeChange","previewEdgeChangeView","changeEdgeDrag","changeEdgeStop","unblur","connectEdge","otherPort","oldLength","holePosition","index","plugSetActive","plugCheckActive","topEdgeZ","previewEdge","previewEdgeView","makeSvgElement","tag","attrs","createElementNS","k","setAttributeNS","classList","positions","from","to","class","elEdge","elShadow","addEventListener","selectedChange","previewPosition","dataflowParent","pathD","edgePath","halfX","floor","halfX2","halfY","halfY2","control1","control2","abs","removeChild","click .dataflow-card-pin","click .dataflow-card-close","pinnedChanged","animate","timestamp","togglePin","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","apply","loop","MenuItem","action","Menu","call","MenuItemView","clicked","makeEditable","attribute","contentEditable","initial","revert","focus","keydown","which","$inputs","children","templateData","replace","$choose","$log","changeRoute","button","showLogs","lastLog","logs","renderLogs","firstToShow","li","group","first","scrollHeight","Edit","selectAll","cut","copy","copied","removeSelected","forEach","connectedSource","any","connectedTarget","paste","oldId","newNode","newEdge","buttons","toRemove","onSearch","results","toLowerCase","indexOf","Elements","list","Library","$container","$library","excluded","itemTemplate","addLibraryItem","$item","stop","update","exclude","sortedLibrary","sortBy","Object","keys","Source","updateAllowed","$form","$code","scrollBackTop","listeners","boo","allowUpdate","allowed","$button","removeAttr","submit","updateGraph","g","Log","escape","logged","nodeAdded","nodeRemoved","edgeAdded","edgeRemoved","Inspector","KeyBinding","keyDown","Notification","webNotifications","webkitNotifications","requestPermission","hasPermission","checkPermission","notify","title","notification","createNotification","Search","SearchResult","SearchResults","models","search","ResultView","$search","ResultsView","ResultsCard","searchPlugin","pluginResults","result","Base","BaseResizable","w","json","resizable","minHeight","minWidth","resizeStop","size","DataflowSubgraph","filter","addInput","addOutput","removeInput","removeOutput","newInput","inputNode","newOutput","outputNode","showSubgraph"],"mappings":"AASA,QAASA,gBAAeC,GACtBC,KAAKC,OAAQ,GAAIC,OAAMH,GACvBC,KAAKG,OAAQ,EAEfL,eAAeM,UAAUC,SAAU,WACjC,MAAO,0BAA0BL,KAAKC,OAAOE,OAAO,YAAYH,KAAKG,OAAO,KAE9EL,eAAeM,UAAUE,IAAK,SAASC,GACrC,MAAM,GAAFA,GAAOA,EAAEP,KAAKG,OAAOH,KAAKC,OAAOE,OAC5BK,OACFR,KAAKC,OAAOM,EAAEP,KAAKC,OAAOE,SAEnCL,eAAeM,UAAUK,IAAM,SAASF,EAAGG,GACzC,GAAM,EAAFH,GAAOA,EAAEP,KAAKG,OAAOH,KAAKC,OAAOE,OACnC,KAAML,gBAAea,UACvB,MAAOJ,EAAEP,KAAKG,QACZH,KAAKC,OAAOD,KAAKG,OAAOH,KAAKC,OAAOE,QAAUK,OAC9CR,KAAKG,QAEPH,MAAKC,OAAOM,EAAEP,KAAKC,OAAOE,QAAUO,EAChCH,GAAGP,KAAKG,QACVH,KAAKG,UAETL,eAAeM,UAAUQ,KAAO,SAASF,GACvCV,KAAKC,OAAOD,KAAKG,OAAOH,KAAKC,OAAOE,QAAUO,EAC9CV,KAAKG,UAEPL,eAAea,cAEd,WACC,GAAIE,GAAMC,SAASC,MAAMC,QACvBC,EAAK,SAASC,GACZ,MAAOlB,MAAKmB,IAAIC,KAAKF,IAEvBG,WAAY,WACVrB,KAAKsB,GAAKC,SAASC,cAAc,OACjCxB,KAAKsB,GAAGG,UAAY,WACpBzB,KAAKmB,IAAMF,EAAEjB,KAAKsB,IAGlBtB,KAAKmB,IAAIO,KAAK,WAAY1B,KAG1B,IAAI2B,GAAOC,SAASxB,UAAUyB,OAAO,OAiBrC,IAhBA7B,KAAK8B,WAAa,GAAIH,GAAKI,WAC3B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S,KAAKlT,EAAED,IAAI;EACjCN,OAEL4jB,UAAW,SAAShZ,GAEbA,EAAOtK,IAAI,eAGhBsK,EAAOtK,IAAI,cAAcuH,GAAG,eAAgB,SAASoO,GACnDrL,EAAO5I,KAAKf,EAAE,UAAUwS,KAAKwC,EAAE3V,IAAI,WAClCN,OAELmkB,aAAc,WACZnkB,KAAKyF,MAAMW,MAAM7B,SAASkC,UAAUzG,KAAKyF,MAAMW,WAInDxE"} \ No newline at end of file +{"version":3,"file":"build/dataflow.min.js","sources":["build/dataflow.build.js"],"names":["CircularBuffer","n","this","_array","Array","length","prototype","toString","get","i","undefined","set","v","IndexError","push","App","Backbone","Model","extend","$","query","$el","find","initialize","el","document","createElement","className","data","Card","Dataflow","module","shownCards","Collection","view","CollectionView","collection","append","debug","controls","name","plugins","inputs","editable","appendTo","css","margin","padding","width","height","id","attr","loadState","modules","nodes","node","description","plugin","addCard","card","leaveUnpinned","hideCards","bringToTop","add","removeCard","remove","unpinned","where","pinned","addPlugin","info","enabled","menu","dataflow","icon","label","showLabel","showPlugin","onShow","enablePlugin","disablePlugin","showContextBar","contextBar","show","hideContextBar","hide","contexts","prepareContext","ctx","MenuCard","View","model","addContext","_","each","context","changeContext","selectedNodes","selectedEdges","bind","loadGraph","source","graph","currentGraph","Graph","newGraph","render","showGraph","detach","log","message","trigger","arguments","console","types","window","exports","addEvents","events","delegateEvents","clone","prepend","options","tagName","itemView","parent","addItem","on","removeItem","item","StateModel","stateKey","cid","stateData","JSON","parse","localStorage","getItem","state","stateInstance","setItem","stringify","toJSON","Node","Edge","defaults","edges","panX","panY","zoom","parentGraph","nodesArray","type","edge","edgesArray","port","target","sourceNode","targetNode","outputs","selectionChanged","selectNode","selectEdge","selected","at","Input","Output","x","y","inputArray","parentNode","input","value","outputArray","output","changeSelected","setState","setBang","send","self","defer","recieve","unload","comparator","multiple","connected","canConnect","connect","uniq","disconnect","without","z","route","preview","attributes","e","select","isConnectedToPort","isConnectedToNode","topZ","thisZ","unhighlight","off","minZoom","maxZoom","style","hasOwnProperty","template","click .dataflow-graph","dragstart .dataflow-graph-panzoom","drag .dataflow-graph-panzoom","dragstop .dataflow-graph-panzoom","click .dataflow-graph-gotoparent","mousewheel","html","addNode","removeNode","addEdge","removeEdge","draggable","helper","h","$graphEl","graphEl","transform","transformOrigin","bindInteraction","panStartOffset","panStart","event","ui","offset","pan","scale","deltaX","left","deltaY","top","panStop","tempPanX","tempPanY","setPanDebounce","debounce","mouseWheel","preventDefault","oe","originalEvent","wheelDeltaX","wheelDeltaY","gotoParent","bindZoom","bindScroll","Hammer","currentZoom","startX","startY","originX","originY","distance_to_origin_x","distance_to_origin_y","gesture","center","pageX","pageY","graphOffset","Math","max","min","onZoom","lastClass","zoomClass","removeClass","addClass","zoomIn","zoomOut","zoomCenter","rerenderEdges","CustomType","BaseNode","appendChild","edgeView","sizeSVG","svg","rect","getBBox","round","setAttribute","error","deselect","invoke","unfade","fade","fadeEdges","startHighlightCompatible","fromInput","blur","stopHighlightCompatible","innerTemplate","click .dataflow-node-header","dragstart","drag","dragstop","handle","listenTo","bumpPosition","selectedChanged","changeLabel","hideInspector","$inner","_alsoDrag","_dragDelta","$dragHelpers","dragStart","stopPropagation","parseInt","text","position","originalPosition","dragStop","moveToPosition","empty","silent","removeModel","zIndex","toggle","ctrlKey","metaKey","inspector","getInspector","inspect","InspectView","showInspector","highlight","click","drop","dragstart .dataflow-port-hole","drag .dataflow-port-hole","dragstop .dataflow-port-hole","dragstart .dataflow-port-plug","drag .dataflow-port-plug","dragstop .dataflow-port-plug","$input","_holePosition","nodeState","cursor","disabled","distance","delay","droppable","accept","activeClassType","refreshPositions","isString","split","isArray","o","val","renderInput","setInputValue","option","change","inputSelect","step","inputInt","inputFloat","inputBoolean","inputObject","inputBang","inputString","selectVal","prop","parseFloat","obj","err","newEdgeStart","topRoute","previewEdgeNew","previewEdgeNewView","graphSVGElement","newEdgeDrag","clientY","clientX","df","scrollLeft","scrollTop","newEdgeStop","getTopEdge","topEdge","isConnected","changeEdgeStart","changeEdge","previewEdgeChange","previewEdgeChangeView","changeEdgeDrag","changeEdgeStop","unblur","connectEdge","otherPort","oldLength","holePosition","index","plugSetActive","plugCheckActive","topEdgeZ","previewEdge","previewEdgeView","makeSvgElement","tag","attrs","createElementNS","k","setAttributeNS","classList","positions","from","to","class","elEdge","elShadow","addEventListener","selectedChange","previewPosition","dataflowParent","pathD","edgePath","halfX","floor","halfX2","halfY","halfY2","control1","control2","abs","removeChild","click .dataflow-card-pin","click .dataflow-card-close","pinnedChanged","animate","timestamp","togglePin","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","apply","loop","MenuItem","action","Menu","call","MenuItemView","clicked","makeEditable","attribute","contentEditable","initial","revert","focus","keydown","which","$inputs","children","templateData","replace","$choose","$log","changeRoute","button","showLogs","lastLog","logs","renderLogs","firstToShow","li","group","first","scrollHeight","Edit","selectAll","cut","copy","copied","removeSelected","forEach","connectedSource","any","connectedTarget","paste","oldId","newNode","newEdge","buttons","toRemove","onSearch","results","toLowerCase","indexOf","Elements","list","Library","$container","$library","excluded","itemTemplate","addLibraryItem","$item","stop","update","exclude","sortedLibrary","sortBy","Object","keys","Source","updateAllowed","$form","$code","scrollBackTop","listeners","boo","allowUpdate","allowed","$button","removeAttr","submit","updateGraph","g","Log","escape","logged","nodeAdded","nodeRemoved","edgeAdded","edgeRemoved","Inspector","KeyBinding","Search","keyDown","Notification","webNotifications","webkitNotifications","requestPermission","hasPermission","checkPermission","notify","title","notification","createNotification","SearchResult","SearchResults","models","search","ResultView","$search","ResultsView","ResultsCard","searchPlugin","pluginResults","result","Base","BaseResizable","w","json","resizable","minHeight","minWidth","resizeStop","size","DataflowSubgraph","filter","addInput","addOutput","removeInput","removeOutput","newInput","inputNode","newOutput","outputNode","showSubgraph"],"mappings":"AASA,QAASA,gBAAeC,GACtBC,KAAKC,OAAQ,GAAIC,OAAMH,GACvBC,KAAK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eAGhBsK,EAAOtK,IAAI,cAAcuH,GAAG,eAAgB,SAASoO,GACnDrL,EAAO5I,KAAKf,EAAE,UAAUwS,KAAKwC,EAAE3V,IAAI,WAClCN,OAELmkB,aAAc,WACZnkB,KAAKyF,MAAMW,MAAM7B,SAASkC,UAAUzG,KAAKyF,MAAMW,WAInDxE"} \ No newline at end of file diff --git a/src/plugins/keybinding.js b/src/plugins/keybinding.js index 8a98122..3e3e572 100644 --- a/src/plugins/keybinding.js +++ b/src/plugins/keybinding.js @@ -5,9 +5,9 @@ var KeyBinding = Dataflow.prototype.plugin("keybinding"); var Edit = Dataflow.prototype.plugin("edit"); + var Search = Dataflow.prototype.plugin("search"); KeyBinding.initialize = function(dataflow){ - function zoomIn() { if (dataflow && dataflow.currentGraph && dataflow.currentGraph.view) { dataflow.currentGraph.view.zoomIn(); @@ -61,6 +61,10 @@ break; case 90: // z break; + case 83: // s + event.preventDefault(); + Search.focus(); + break; default: break; } diff --git a/src/plugins/search.js b/src/plugins/search.js index 44967c4..4606d99 100644 --- a/src/plugins/search.js +++ b/src/plugins/search.js @@ -55,6 +55,10 @@ $button.on('click', function () { dataflow.showPlugin('menu'); }); + + Search.focus = function () { + $input.focus(); + }; }; Search.search = function (text, dataflow) {