folk-canvas/demo/arrows.html

50 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Arrows</title>
<style>
html {
height: 100%;
}
body {
min-height: 100%;
position: relative;
margin: 0;
}
fc-geometry {
border: 1px solid black;
border-radius: 3px;
}
fc-connection {
display: block;
position: absolute;
inset: 0 0 0 0;
}
#box2 {
max-width: 10ch;
}
</style>
</head>
<body>
<fc-geometry id="box1" x="100" y="100" width="50" height="50"></fc-geometry>
<fc-geometry id="box2" x="200" y="300">Hello World</fc-geometry>
<fc-connection source="#box1" target="#box2"></fc-connection>
<fc-connection source="#box1" target="400,100"></fc-connection>
<script type="module">
import { FolkGeometry } from '../src/canvas/fc-geometry.ts';
import { FolkConnection } from '../src/arrows/fc-connection.ts';
FolkGeometry.register();
FolkConnection.register();
</script>
</body>
</html>