2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 23:00:56 +00:00

chore: refactor deprecated contructor

This commit is contained in:
18alantom 2022-02-06 23:08:35 +05:30
parent 71d55950ff
commit ad70b64e0c

View File

@ -300,13 +300,9 @@ export default {
this.$refs.tooltip.update(event); this.$refs.tooltip.update(event);
}, },
getSvgXY({ clientX, clientY }) { getSvgXY({ clientX, clientY }) {
// This func is apparently deprecated, will update when removed const inv = this.$refs.chartSvg.getScreenCTM().inverse();
const point = this.$refs.chartSvg.createSVGPoint(); const point = new DOMPoint(clientX, clientY);
point.x = clientX; const { x, y } = point.matrixTransform(inv);
point.y = clientY;
const { x, y } = point.matrixTransform(
this.$refs.chartSvg.getScreenCTM().inverse()
);
return { x, y }; return { x, y };
}, },
getPointIndexAndCoords(x, y) { getPointIndexAndCoords(x, y) {