File: README.Debian

package info (click to toggle)
node-svgdotjs-svg.draggable.js 3.0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: javascript: 93; makefile: 19
file content (28 lines) | stat: -rw-r--r-- 737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Here is a minimal example which shows how to display some SVG objects
in page served by Apache2, with the help of SVG.js:

----------------------------------------------------------

<!DOCTYPE html>
<html>
<head>
  <title>SVG.draggable.js</title>
</head>
<body>
  <script type="module" src="/javascript/svg.draggable.js/src/svg.draggable.js">
  </script>
  <script type="module">
    import { SVG } from '/javascript/svg.js/src/main.js'
    // initialize SVG.js
    var draw = SVG().addTo('body')

    // draw pink square
    var rect = draw.rect(100, 100).move(100, 50).fill('#f06')
    // make it draggable
    rect.draggable()
  </script>
</body>
</html>


 -- Georges Khaznadar <georgesk@debian.org>, Sat,  7 Dec 2024 15:53:44 +0100