folk-canvas/demo/toolset.html

63 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Toolbar Demo</title>
<style>
html {
height: 100%;
}
body {
min-height: 100%;
position: relative;
margin: 0;
overscroll-behavior: none;
}
folk-shape {
background: transparent;
background-color: rgb(140, 140, 140);
border-radius: 2px;
border: 2px solid rgba(0, 0, 0, 0.5);
}
/* allow distance field to be interacted with for toolset */
folk-distance-field {
pointer-events: all;
}
</style>
</head>
<body>
<folk-toolset>
<folk-sand>
<folk-shape id="s1" x="100" y="100" width="50" height="50"></folk-shape>
<folk-shape id="s2" x="100" y="200" width="50" height="50"></folk-shape>
<folk-shape id="s3" x="100" y="300" width="50" height="50"></folk-shape>
<folk-shape id="s4" x="300" y="150" width="80" height="40"></folk-shape>
<folk-shape id="s5" x="400" y="250" width="60" height="90"></folk-shape>
<folk-shape id="s6" x="200" y="400" width="100" height="100"></folk-shape>
<folk-shape id="s7" x="500" y="100" width="30" height="70"></folk-shape>
<folk-shape id="s8" x="500" y="200">
<folk-shape-tool></folk-shape-tool>
</folk-shape>
<folk-shape x="700" y="200">
<folk-delete-tool></folk-delete-tool>
</folk-shape>
<folk-shape x="500" y="300">
<folk-propagator-tool></folk-propagator-tool>
</folk-shape>
</folk-sand>
</folk-toolset>
<script type="module">
import '../src/standalone/folk-event-propagator.ts';
import '../src/standalone/folk-shape.ts';
import '../src/standalone/folk-distance-field.ts';
import '../src/standalone/folk-sand.ts';
import '../src/standalone/folk-toolset.ts';
</script>
</body>
</html>