text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("nd-ez-signiture",["exports","@angular/core","@angular/common"],e):e(t["nd-ez-signiture"]={},t.ng.core,t.ng.common)}(this,function(t,e,n){"use strict";var i=function(){function t(t){this.renderer=t,this.width=200,this.height=200,this.ndStrokeColor="#000",this.ndLineWidth=3,this.dataSigniture=new e.EventEmitter,this.mouseIsDown=!1,this.blankCanvas=document.createElement("canvas"),this.dataReturn={isEmptyCanvas:!0,image:null}}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){this.canvasElement=this.canvas.nativeElement,this.renderer.setAttribute(this.canvasElement,"width",this.width+"px"),this.renderer.setAttribute(this.canvasElement,"height",this.height+"px"),this.renderer.setAttribute(this.ndContainer.nativeElement,"style","width:"+this.width+"px"),this.blankCanvas.height=this.height,this.blankCanvas.width=this.width},t.prototype.ngAfterContentInit=function(){this.dataSigniture.emit(this.dataReturn)},t.prototype.mouseUp=function(t){this.mouseIsDown=!1,this.ndGetDataSigniture()},t.prototype.mouseDown=function(t){this.mouseIsDown=!0,this.lastX=t.layerX,this.lastY=t.layerY},t.prototype.mouseMove=function(t){var e=this.canvasElement.getContext("2d");this.mouseIsDown&&(e.beginPath(),e.moveTo(this.lastX,this.lastY),e.lineTo(t.layerX,t.layerY),e.closePath(),e.strokeStyle=this.ndStrokeColor,e.lineWidth=this.ndLineWidth,e.stroke(),this.lastX=t.layerX,this.lastY=t.layerY)},t.prototype.mouseLeave=function(){this.mouseIsDown=!1,this.ndGetDataSigniture()},t.prototype.ndClearCanvas=function(){this.canvasElement.getContext("2d").clearRect(0,0,this.height,this.width),this.ndGetDataSigniture()},t.prototype.ndGetDataSigniture=function(){this.dataReturn.isEmptyCanvas=this.canvasElement.toDataURL()==this.blankCanvas.toDataURL(),this.dataReturn.image=this.canvasElement.toDataURL(),this.dataSigniture.emit(this.dataReturn)},t.decorators=[{type:e.Component,args:[{selector:"nd-ez-signiture",template:"<div class='nd-container' #ndContainer>\n    <canvas class='nd-canvas' (mousedown)='mouseDown($event)' (mousemove)='mouseMove($event)' (mouseup)='mouseUp($event)' (mouseout)='mouseLeave()' #ndcanvas></canvas>\n    <span (click)=\"ndClearCanvas()\" class=\"close warp\"></span>\n</div>",styles:[".nd-canvas{border:1px solid #000}.nd-container{position:relative}.nd-cancel-button{top:2px;right:0;position:absolute}.close{cursor:pointer;display:inline-block;width:20px;height:20px;overflow:hidden;border:1px solid #000;top:2px;right:0;position:absolute}.close:hover::after,.close:hover::before{background:red}.close::after,.close::before{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#000}.close::before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.close::after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}"]}]}],t.ctorParameters=function(){return[{type:e.Renderer2}]},t.propDecorators={canvas:[{type:e.ViewChild,args:["ndcanvas"]}],ndContainer:[{type:e.ViewChild,args:["ndContainer"]}],width:[{type:e.Input}],height:[{type:e.Input}],ndStrokeColor:[{type:e.Input}],ndLineWidth:[{type:e.Input}],dataSigniture:[{type:e.Output}]},t}(),o=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule],declarations:[i],exports:[i]}]}],t}();t.NdEzSignitureModule=o,t.ɵa=i,Object.defineProperty(t,"__esModule",{value:!0})});
  //# sourceMappingURL=nd-ez-signiture.umd.min.js.map