neyric/wireit

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

Summary

Maintainability
A
0 mins
Test Coverage
YUI.add("terminal-scissors",function(e,t){e.TerminalScissors=function(t){e.after(this._renderUIScissors,this,"renderUI"),e.after(this._bindUIScissors,this,"bindUI")},e.TerminalScissors.ATTRS={dirNormed:{getter:function(){var e=this.get("dir"),t=e[0],n=e[1],r=Math.sqrt(t*t+n*n);return[e[0]/r,e[1]/r]}},scissorsDistance:{value:30}},e.TerminalScissors.prototype={_renderUIScissors:function(){this.get("editable")&&this._renderScissors()},_bindUIScissors:function(){this.get("editable")&&this._scissorsOverlay.get("boundingBox").on("click",this.destroyWires,this)},_renderScissors:function(){this._scissorsOverlay=new e.Overlay({}),this._scissorsOverlay.get("contentBox").addClass(this.getClassName("scissors"));var t=this.get("xy"),n=this.get("dirNormed"),r=this.get("scissorsDistance");this._scissorsOverlay.set("x",t[0]+n[0]*r-8),this._scissorsOverlay.set("y",t[1]+n[1]*r-8),this._scissorsOverlay.render(this.get("boundingBox"))}}},"@VERSION@",{requires:["overlay"],skinnable:!0});