This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/es5/components/VSparkline/helpers/path.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
2.8 KiB
Text

{"version":3,"sources":["../../../../src/components/VSparkline/helpers/path.ts"],"names":[],"mappings":";;;;;;;AACA;;AAEA;;;AAGM,SAAU,OAAV,CAAmB,MAAnB,EAAoC,MAApC,EAA6E;AAAA,MAAzB,IAAyB,uEAAlB,KAAkB;AAAA,MAAX,MAAW,uEAAF,EAAE;AACjF,MAAM,KAAK,GAAG,MAAM,CAAC,KAAP,EAAd;AACA,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAP,GAAgB,CAAjB,CAAlB;AAEA,SACE,CAAC,IAAI,cAAO,KAAK,CAAC,CAAb,cAAkB,MAAM,GAAG,KAAK,CAAC,CAAf,GAAmB,CAArC,eAA2C,KAAK,CAAC,CAAjD,cAAsD,KAAK,CAAC,CAA5D,eAAsE,KAAK,CAAC,CAA5E,cAAiF,KAAK,CAAC,CAAvF,CAAL,IACA,MAAM,CACH,GADH,CACO,UAAC,KAAD,EAAQ,KAAR,EAAiB;AACpB,QAAM,IAAI,GAAG,MAAM,CAAC,KAAK,GAAG,CAAT,CAAnB;AACA,QAAM,IAAI,GAAG,MAAM,CAAC,KAAK,GAAG,CAAT,CAAN,IAAqB,KAAlC;AACA,QAAM,WAAW,GAAG,IAAI,IAAI,0BAAe,IAAf,EAAqB,KAArB,EAA4B,IAA5B,CAA5B;;AAEA,QAAI,CAAC,IAAD,IAAS,WAAb,EAA0B;AACxB,wBAAW,KAAK,CAAC,CAAjB,cAAsB,KAAK,CAAC,CAA5B;AACD;;AAED,QAAM,SAAS,GAAG,IAAI,CAAC,GAAL,CAChB,uBAAY,IAAZ,EAAkB,KAAlB,CADgB,EAEhB,uBAAY,IAAZ,EAAkB,KAAlB,CAFgB,CAAlB;AAIA,QAAM,mBAAmB,GAAG,SAAS,GAAG,CAAZ,GAAgB,MAA5C;AACA,QAAM,cAAc,GAAG,mBAAmB,GAAG,SAAS,GAAG,CAAf,GAAmB,MAA7D;AAEA,QAAM,MAAM,GAAG,kBAAO,IAAP,EAAa,KAAb,EAAoB,cAApB,CAAf;AACA,QAAM,KAAK,GAAG,kBAAO,IAAP,EAAa,KAAb,EAAoB,cAApB,CAAd;AAEA,sBAAW,MAAM,CAAC,CAAlB,cAAuB,MAAM,CAAC,CAA9B,cAAmC,KAAK,CAAC,CAAzC,cAA8C,KAAK,CAAC,CAApD,cAAyD,KAAK,CAAC,CAA/D,cAAoE,KAAK,CAAC,CAA1E;AACD,GArBH,EAsBG,IAtBH,CAsBQ,EAtBR,CADA,IAwBC,IAAI,cAAO,GAAG,CAAC,CAAX,cAAgB,MAAM,GAAG,KAAK,CAAC,CAAf,GAAmB,CAAnC,UAA2C,EAxBhD,CADF;AA2BD","sourcesContent":["import { Point } from '../VSparkline'\nimport { checkCollinear, getDistance, moveTo } from './math'\n\n/**\n * From https://github.com/unsplash/react-trend/blob/master/src/helpers/DOM.helpers.js#L18\n */\nexport function genPath (points: Point[], radius: number, fill = false, height = 75) {\n const start = points.shift()!\n const end = points[points.length - 1]\n\n return (\n (fill ? `M${start.x} ${height - start.x + 2} L${start.x} ${start.y}` : `M${start.x} ${start.y}`) +\n points\n .map((point, index) => {\n const next = points[index + 1]\n const prev = points[index - 1] || start\n const isCollinear = next && checkCollinear(next, point, prev)\n\n if (!next || isCollinear) {\n return `L${point.x} ${point.y}`\n }\n\n const threshold = Math.min(\n getDistance(prev, point),\n getDistance(next, point)\n )\n const isTooCloseForRadius = threshold / 2 < radius\n const radiusForPoint = isTooCloseForRadius ? threshold / 2 : radius\n\n const before = moveTo(prev, point, radiusForPoint)\n const after = moveTo(next, point, radiusForPoint)\n\n return `L${before.x} ${before.y}S${point.x} ${point.y} ${after.x} ${after.y}`\n })\n .join('') +\n (fill ? `L${end.x} ${height - start.x + 2} Z` : '')\n )\n}\n"],"sourceRoot":"","file":"path.js"}