/** 獲取svg坐標點,兼容縮放和平移后的情況 */
// $event 方法原生參數(shù)
// svgEle svg元素Id
export const getSvgPoint = ($event: any, svgEle: string) => {
? const svg: any = document.getElementById(svgEle);
? let svgPoint = svg.createSVGPoint();
? const { clientX, clientY } = $event;
? svgPoint.x = clientX;
? svgPoint.y = clientY;
? const matrix = svg.getScreenCTM().inverse();
? const { x, y } = svgPoint.matrixTransform(matrix);
? return { x: Math.floor(x), y: Math.floor(y) }
};