2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50: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);
},
getSvgXY({ clientX, clientY }) {
// This func is apparently deprecated, will update when removed
const point = this.$refs.chartSvg.createSVGPoint();
point.x = clientX;
point.y = clientY;
const { x, y } = point.matrixTransform(
this.$refs.chartSvg.getScreenCTM().inverse()
);
const inv = this.$refs.chartSvg.getScreenCTM().inverse();
const point = new DOMPoint(clientX, clientY);
const { x, y } = point.matrixTransform(inv);
return { x, y };
},
getPointIndexAndCoords(x, y) {