1 line
5.3 KiB
JSON
1 line
5.3 KiB
JSON
{"ast":null,"code":"function Step(context, t) {\n this._context = context;\n this._t = t;\n}\nStep.prototype = {\n areaStart: function () {\n this._line = 0;\n },\n areaEnd: function () {\n this._line = NaN;\n },\n lineStart: function () {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function () {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function (x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n case 1:\n this._point = 2;\n // falls through\n default:\n {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\nexport default function (context) {\n return new Step(context, 0.5);\n}\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\nexport function stepAfter(context) {\n return new Step(context, 1);\n}","map":{"version":3,"names":["Step","context","t","_context","_t","prototype","areaStart","_line","areaEnd","NaN","lineStart","_x","_y","_point","lineEnd","lineTo","closePath","point","x","y","moveTo","x1","stepBefore","stepAfter"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/d3-shape/src/curve/step.js"],"sourcesContent":["function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n"],"mappings":"AAAA,SAASA,IAAIA,CAACC,OAAO,EAAEC,CAAC,EAAE;EACxB,IAAI,CAACC,QAAQ,GAAGF,OAAO;EACvB,IAAI,CAACG,EAAE,GAAGF,CAAC;AACb;AAEAF,IAAI,CAACK,SAAS,GAAG;EACfC,SAAS,EAAE,SAAAA,CAAA,EAAW;IACpB,IAAI,CAACC,KAAK,GAAG,CAAC;EAChB,CAAC;EACDC,OAAO,EAAE,SAAAA,CAAA,EAAW;IAClB,IAAI,CAACD,KAAK,GAAGE,GAAG;EAClB,CAAC;EACDC,SAAS,EAAE,SAAAA,CAAA,EAAW;IACpB,IAAI,CAACC,EAAE,GAAG,IAAI,CAACC,EAAE,GAAGH,GAAG;IACvB,IAAI,CAACI,MAAM,GAAG,CAAC;EACjB,CAAC;EACDC,OAAO,EAAE,SAAAA,CAAA,EAAW;IAClB,IAAI,CAAC,GAAG,IAAI,CAACV,EAAE,IAAI,IAAI,CAACA,EAAE,GAAG,CAAC,IAAI,IAAI,CAACS,MAAM,KAAK,CAAC,EAAE,IAAI,CAACV,QAAQ,CAACY,MAAM,CAAC,IAAI,CAACJ,EAAE,EAAE,IAAI,CAACC,EAAE,CAAC;IAC3F,IAAI,IAAI,CAACL,KAAK,IAAK,IAAI,CAACA,KAAK,KAAK,CAA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