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
|