Questions tagged [svg.js]

svg.js is a lightweight library for manipulating and animating SVG. Svg.js has no dependencies and aims to be as small as possible and is licensed under the terms of MIT License.

svg.js is a lightweight library for manipulating and animating SVG. Svg.js has no dependencies and aims to be as small as possible and is licensed under the terms of MIT License.


Hello World Example

<div id="drawing"></div>
<script>
    var draw = SVG('drawing').size(300, 300)
    var rect = draw.rect(100, 100).attr({ fill: '#f06' })
</script>

396 questions
1
vote
2 answers

Prod build error when using a svg.js plugin in an Angular 7 application

I am using svg.js alongside svg.draggable.js in a Angular 7 application built using Angular-cli. Locally everything is working fine but once i do a production build I get the error .draggable is not a function when accesing the page. Here's how I…
Maxime
  • 235
  • 1
  • 2
  • 12
1
vote
2 answers

SVG.js 3 with Angular 7 "has no compatible call signatures" error

I'm using Angular 7 and have been able to use SVG.js v2.* but I've been unable to get SVG.js v3.* to work. I've made two github projects, the first show SVG.js v2 working angular7-svgjs2, and the second shows SVG.js v3 not working with the only…
Elementary
  • 399
  • 2
  • 5
  • 17
1
vote
1 answer

svg.filter.js + Angular 7.3: How use

Tell me how to properly connect the svg.filter.js library in the Angular project Tried to do something like that svg.js + Angular 7.3: Build in production mode get 'not a constructor' import { Component, OnInit } from '@angular/core'; import SVG…
1
vote
1 answer

Draw multiple Rectangles with svg.draw.js

The issue was already posted here, but I think was never addressed. I need to create a new rect each time I click "Create SVG Rect" button. Hence drawing multiple rectangles.