{ "version": 3, "sources": ["../../konva/lib/shapes/Rect.js"], "sourcesContent": ["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Rect = void 0;\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Global_1 = require(\"../Global\");\nconst Util_1 = require(\"../Util\");\nconst Validators_1 = require(\"../Validators\");\nclass Rect extends Shape_1.Shape {\n _sceneFunc(context) {\n var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util_1.Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n}\nexports.Rect = Rect;\nRect.prototype.className = 'Rect';\n(0, Global_1._registerNode)(Rect);\nFactory_1.Factory.addGetterSetter(Rect, 'cornerRadius', 0, (0, Validators_1.getNumberOrArrayOfNumbersValidator)(4));\n"], "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AACA,WAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;AAC5D,YAAQ,OAAO;AACf,QAAM,YAAY;AAClB,QAAM,UAAU;AAChB,QAAM,WAAW;AACjB,QAAM,SAAS;AACf,QAAM,eAAe;AACrB,QAAM,OAAN,cAAmB,QAAQ,MAAM;AAAA,MAC7B,WAAW,SAAS;AAChB,YAAI,eAAe,KAAK,aAAa,GAAG,QAAQ,KAAK,MAAM,GAAG,SAAS,KAAK,OAAO;AACnF,gBAAQ,UAAU;AAClB,YAAI,CAAC,cAAc;AACf,kBAAQ,KAAK,GAAG,GAAG,OAAO,MAAM;AAAA,QACpC,OACK;AACD,iBAAO,KAAK,oBAAoB,SAAS,OAAO,QAAQ,YAAY;AAAA,QACxE;AACA,gBAAQ,UAAU;AAClB,gBAAQ,gBAAgB,IAAI;AAAA,MAChC;AAAA,IACJ;AACA,YAAQ,OAAO;AACf,SAAK,UAAU,YAAY;AAC3B,KAAC,GAAG,SAAS,eAAe,IAAI;AAChC,cAAU,QAAQ,gBAAgB,MAAM,gBAAgB,IAAI,GAAG,aAAa,oCAAoC,CAAC,CAAC;AAAA;AAAA;", "names": [] }