Open SunnyXJ opened 5 years ago
`calc:function (e) { var arr = this.el.array().valueOf(); arr.pop();
if (e) {
if(e.type=='mousewheel'){ // get new m for transformPoint
this.m=this.el.node.getScreenCTM().inverse();
}
var p = this.transformPoint(e.clientX, e.clientY);
arr.push(this.snapToGrid([p.x, p.y]));
}
this.el.plot(arr);
this.drawCircles();
},`
@SunnyXJ Your fix works, however, I can't reproduce the issue anymore when using the latest source from this repository.
It seems like the published npm version (2.0.4) is out of date and needs a bump.
now I use svg.draw.js and svg.panzoom.js draw something, but I found when i draw and zoom the position isn't right. I add mousewheel fun and resolve this problem ,code like that: if(e.type=='mousewheel'){ this.m=this.el.node.getScreenCTM().inverse(); }