Open
Description
I'm getting the following error when trying to build a basic filter
svg.filter.js:16 Uncaught TypeError: Class constructor Element cannot be invoked without 'new'
at new Filter (svg.filter.js:16)
at Defs.filter (svg.filter.js:316)
at Use.filterWith (svg.filter.js:336)
I don't understand why this error occurs, because svg.filter.js:316
clearly has a new
:
var filter = this.put(new Filter())
My code:
robot.filterWith((add) =>
add.colorMatrix('hueRotate', 0))
(robot
is an SVG.Use
object.)
package.json
dependencies:
"dependencies": {
"@svgdotjs/svg.filter.js": "^3.0.7",
"@svgdotjs/svg.js": "^3.0.16"
}
HTML:
<script src="node_modules/@svgdotjs/svg.js/dist/svg.min.js"></script>
<script src="node_modules/@svgdotjs/svg.filter.js/dist/svg.filter.js"></script>
Am I missing something obvious?
Metadata
Metadata
Assignees
Labels
No labels