neyric/wireit

View on GitHub
build/terminal/terminal-min.js

Summary

Maintainability
A
0 mins
Test Coverage
YUI.add("terminal",function(e,t){"use strict";e.Terminal=e.Base.create("terminal",e.Widget,[e.WidgetChild,e.WidgetPosition,e.WidgetPositionAlign,e.WiresDelegate,e.TerminalDragEdit,e.TerminalScissors,e.TerminalDDGroups],{syncUI:function(){this._syncOffset()},_syncOffset:function(){var e=this.get("offset");e&&(this._posNode.setStyle("left",e[0]),this._posNode.setStyle("top",e[1]),this.syncXY())},bindUI:function(){var e=this.get("boundingBox");e.on("mouseover",this._onMouseOver,this),e.on("mouseout",this._onMouseOut,this)},_onMouseOver:function(){e.later(300,this,this._showOverlay)},_showOverlay:function(){this.get("boundingBox").addClass(this.getClassName("show-overlay"))},_onMouseOut:function(){e.later(300,this,this._hideOverlay)},_hideOverlay:function(){var e=this.get("boundingBox");e&&e.removeClass(this.getClassName("show-overlay"))},_onAddWire:function(e){this.get("boundingBox").addClass(this.getClassName("connected"))},_onRemoveWire:function(e){this._wires.length===0&&this.get("boundingBox").removeClass(this.getClassName("connected"))},getXY:function(){var e=this.get("parent"),t=e.get("parent"),n=t.get("boundingBox").getXY(),r=this.get("contentBox").getXY();return[r[0]-n[0]+7.5,r[1]-n[1]+7.5]}},{ATTRS:{name:{value:null},dir:{value:[0,1]},alignNode:{value:null},offset:{value:null,validator:function(e){return this._validateXY(e)}}}})},"@VERSION@",{requires:["widget","widget-child","widget-position","widget-position-align","wire-base","wires-delegate","terminal-dragedit","terminal-scissors","terminal-ddgroups"],skinnable:!0});