fix(SVGCanvasElement): addEventListener

This commit is contained in:
Zeno Zeng 2022-02-04 15:44:00 +08:00
parent 3991b8ee96
commit aad3657347
3 changed files with 8 additions and 4 deletions

View File

@ -32,11 +32,15 @@ https://zenozeng.github.io/p5.js-svg/test/
## CHANGELOG ## CHANGELOG
## v2.2.0 ### v2.2.1
- fix(SVGCanvasElement): addEventListener
### v2.2.0
- feat: Context.prototype.getImageData (experimental) for https://github.com/gliffy/canvas2svg/issues/3 and https://github.com/zenozeng/p5.js-svg/issues/203 - feat: Context.prototype.getImageData (experimental) for https://github.com/gliffy/canvas2svg/issues/3 and https://github.com/zenozeng/p5.js-svg/issues/203
## v2.1.0 ### v2.1.0
- feat: SVGCanvasElement(options) - feat: SVGCanvasElement(options)
- feat: options.debug - feat: options.debug

View File

@ -87,7 +87,7 @@ SVGCanvasElement.prototype.toDataURL = function(type, encoderOptions, options) {
}; };
SVGCanvasElement.prototype.addEventListener = function() { SVGCanvasElement.prototype.addEventListener = function() {
return this.svg.addEventListener.apply(this, arguments); return this.svg.addEventListener.apply(this.svg, arguments);
}; };
// will return wrapper element: <div><svg></svg></div> // will return wrapper element: <div><svg></svg></div>

View File

@ -1,6 +1,6 @@
{ {
"name": "svgcanvas", "name": "svgcanvas",
"version": "2.2.0", "version": "2.2.1",
"description": "svgcanvas", "description": "svgcanvas",
"main": "dist/svgcanvas.js", "main": "dist/svgcanvas.js",
"scripts": { "scripts": {