46 lines
1.1 KiB
HTML
46 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;
|
|
}
|
|
|
|
folk-shape {
|
|
border: 1px solid black;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
folk-connection {
|
|
display: block;
|
|
position: absolute;
|
|
inset: 0 0 0 0;
|
|
pointer-events: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<folk-shape id="box1" x="50" y="100" width="50" height="50"></folk-shape>
|
|
<folk-shape id="box2" x="150" y="300" width="50" height="50"></folk-shape>
|
|
<folk-connection source="#box1" target="#box2"></folk-connection>
|
|
|
|
<script type="module">
|
|
import { FolkShape } from '../src/folk-shape.ts';
|
|
import { FolkConnection } from '../src/folk-connection.ts';
|
|
import '../src/common/iframe-script.ts';
|
|
|
|
FolkShape.define();
|
|
FolkConnection.define();
|
|
</script>
|
|
</body>
|
|
</html>
|