18cfd8e5febf51652330445f2b9f233cc3a86aa9d77f1bcb5ff73a1df99ac96d.json 5.4 KB

1
  1. {"ast":null,"code":"import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as roundRectHelper from '../helper/roundRect.js';\nimport { subPixelOptimizeRect } from '../helper/subPixelOptimize.js';\nvar RectShape = function () {\n function RectShape() {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n }\n return RectShape;\n}();\nexport { RectShape };\nvar subPixelOptimizeOutputShape = {};\nvar Rect = function (_super) {\n __extends(Rect, _super);\n function Rect(opts) {\n return _super.call(this, opts) || this;\n }\n Rect.prototype.getDefaultShape = function () {\n return new RectShape();\n };\n Rect.prototype.buildPath = function (ctx, shape) {\n var x;\n var y;\n var width;\n var height;\n if (this.subPixelOptimize) {\n var optimizedShape = subPixelOptimizeRect(subPixelOptimizeOutputShape, shape, this.style);\n x = optimizedShape.x;\n y = optimizedShape.y;\n width = optimizedShape.width;\n height = optimizedShape.height;\n optimizedShape.r = shape.r;\n shape = optimizedShape;\n } else {\n x = shape.x;\n y = shape.y;\n width = shape.width;\n height = shape.height;\n }\n if (!shape.r) {\n ctx.rect(x, y, width, height);\n } else {\n roundRectHelper.buildPath(ctx, shape);\n }\n };\n Rect.prototype.isZeroArea = function () {\n return !this.shape.width || !this.shape.height;\n };\n return Rect;\n}(Path);\nRect.prototype.type = 'rect';\nexport default Rect;","map":{"version":3,"names":["__extends","Path","roundRectHelper","subPixelOptimizeRect","RectShape","x","y","width","height","subPixelOptimizeOutputShape","Rect","_super","opts","call","prototype","getDefaultShape","buildPath","ctx","shape","subPixelOptimize","optimizedShape","style","r","rect","isZeroArea","type"],"sources":["E:/git/2021项目/安科院大屏/node_modules/zrender/lib/graphic/shape/Rect.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport Path from '../Path.js';\nimport * as roundRectHelper from '../helper/roundRect.js';\nimport { subPixelOptimizeRect } from '../helper/subPixelOptimize.js';\nvar RectShape = (function () {\n function RectShape() {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n }\n return RectShape;\n}());\nexport { RectShape };\nvar subPixelOptimizeOutputShape = {};\nvar Rect = (function (_super) {\n __extends(Rect, _super);\n function Rect(opts) {\n return _super.call(this, opts) || this;\n }\n Rect.prototype.getDefaultShape = function () {\n return new RectShape();\n };\n Rect.prototype.buildPath = function (ctx, shape) {\n var x;\n var y;\n var width;\n var height;\n if (this.subPixelOptimize) {\n var optimizedShape = subPixelOptimizeRect(subPixelOptimizeOutputShape, shape, this.style);\n x = optimizedShape.x;\n y = optimizedShape.y;\n width = optimizedShape.width;\n height = optimizedShape.height;\n optimizedShape.r = shape.r;\n shape = optimizedShape;\n }\n else {\n x = shape.x;\n y = shape.y;\n width = shape.width;\n height = shape.height;\n }\n if (!shape.r) {\n ctx.rect(x, y, width, height);\n }\n else {\n roundRectHelper.buildPath(ctx, shape);\n }\n };\n Rect.prototype.isZeroArea = function () {\n return !this.shape.width || !this.shape.height;\n };\n return Rect;\n}(Path));\nRect.prototype.type = 'rect';\nexport default Rect;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,OAAOC,IAAI,MAAM,YAAY;AAC7B,OAAO,KAAKC,eAAe,MAAM,wBAAwB;AACzD,SAASC,oBAAoB,QAAQ,+BAA+B;AACpE,IAAIC,SAAS,GAAI,YAAY;EACzB,SAASA,SAASA,CAAA,EAAG;IACjB,IAAI,CAACC,CAAC,GAAG,CAAC;IACV,IAAI,CAACC,CAAC,GAAG,CAAC;IACV,IAAI,CAACC,KAAK,GAAG,CAAC;IACd,IAAI,CAACC,MAAM,GAAG,CAAC;EACnB;EACA,OAAOJ,SAAS;AACpB,CAAC,CAAC,CAAE;AACJ,SAASA,SAAS;AAClB,IAAIK,2BAA2B,GAAG,CAAC,CAAC;AACpC,IAAIC,IAAI,GAAI,UAAUC,MAAM,EAAE;EAC1BX,SAAS,CAACU,IAAI,EAAEC,MAAM,CAAC;EACvB,SAASD,IAAI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