{ "version": 3, "sources": ["../../konva/lib/shapes/Ring.js"], "sourcesContent": ["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Ring = void 0;\nconst Factory_1 = require(\"../Factory\");\nconst Shape_1 = require(\"../Shape\");\nconst Validators_1 = require(\"../Validators\");\nconst Global_1 = require(\"../Global\");\nvar PIx2 = Math.PI * 2;\nclass Ring extends Shape_1.Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.innerRadius(), 0, PIx2, false);\n context.moveTo(this.outerRadius(), 0);\n context.arc(0, 0, this.outerRadius(), PIx2, 0, true);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nexports.Ring = Ring;\nRing.prototype.className = 'Ring';\nRing.prototype._centroid = true;\nRing.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n(0, Global_1._registerNode)(Ring);\nFactory_1.Factory.addGetterSetter(Ring, 'innerRadius', 0, (0, Validators_1.getNumberValidator)());\nFactory_1.Factory.addGetterSetter(Ring, 'outerRadius', 0, (0, Validators_1.getNumberValidator)());\n"], "mappings": ";;;;;;;;;;;;;AAAA;AAAA;AACA,WAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;AAC5D,YAAQ,OAAO;AACf,QAAM,YAAY;AAClB,QAAM,UAAU;AAChB,QAAM,eAAe;AACrB,QAAM,WAAW;AACjB,QAAI,OAAO,KAAK,KAAK;AACrB,QAAM,OAAN,cAAmB,QAAQ,MAAM;AAAA,MAC7B,WAAW,SAAS;AAChB,gBAAQ,UAAU;AAClB,gBAAQ,IAAI,GAAG,GAAG,KAAK,YAAY,GAAG,GAAG,MAAM,KAAK;AACpD,gBAAQ,OAAO,KAAK,YAAY,GAAG,CAAC;AACpC,gBAAQ,IAAI,GAAG,GAAG,KAAK,YAAY,GAAG,MAAM,GAAG,IAAI;AACnD,gBAAQ,UAAU;AAClB,gBAAQ,gBAAgB,IAAI;AAAA,MAChC;AAAA,MACA,WAAW;AACP,eAAO,KAAK,YAAY,IAAI;AAAA,MAChC;AAAA,MACA,YAAY;AACR,eAAO,KAAK,YAAY,IAAI;AAAA,MAChC;AAAA,MACA,SAAS,OAAO;AACZ,aAAK,YAAY,QAAQ,CAAC;AAAA,MAC9B;AAAA,MACA,UAAU,QAAQ;AACd,aAAK,YAAY,SAAS,CAAC;AAAA,MAC/B;AAAA,IACJ;AACA,YAAQ,OAAO;AACf,SAAK,UAAU,YAAY;AAC3B,SAAK,UAAU,YAAY;AAC3B,SAAK,UAAU,sBAAsB,CAAC,eAAe,aAAa;AAClE,KAAC,GAAG,SAAS,eAAe,IAAI;AAChC,cAAU,QAAQ,gBAAgB,MAAM,eAAe,IAAI,GAAG,aAAa,oBAAoB,CAAC;AAChG,cAAU,QAAQ,gBAAgB,MAAM,eAAe,IAAI,GAAG,aAAa,oBAAoB,CAAC;AAAA;AAAA;", "names": [] }