Files
ueblueprint/ueblueprint.html
2021-10-01 20:07:09 +02:00

55 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<style>
</style>
<link rel="stylesheet" href="css/ueblueprint-node-value-type-color.css">
<link rel="stylesheet" href="css/ueblueprint-style.css">
</head>
<body>
<div>Hello</div>
<script type="module">
import { UEBlueprint, UEBlueprintObject } from "./ueblueprint.js"
let blueprint = new UEBlueprint()
let node1 = new UEBlueprintObject()
node1.setLocation([400, 200])
let node2 = new UEBlueprintObject()
node2.setLocation([300, 100])
blueprint.addNode(node1, node2)
document.querySelector('body').appendChild(blueprint)
let a = 123
</script>
<script type="module">
/*
document.addEventListener("DOMContentLoaded", function (event) {
let leftmost = Number.MAX_SAFE_INTEGER;
let topmost = Number.MAX_SAFE_INTEGER;
let draggableElements = document.querySelectorAll('.ueb-node').forEach(function (node) {
new UEBlueprintDrag(node)
leftmost = Math.min(leftmost, node.offsetLeft)
topmost = Math.min(leftmost, node.offsetTop)
})
document.querySelectorAll('.ueb-grid').forEach(function (grid) {
let obj = new UEBlueprintDragScrollGrid(grid, {
'clickButton': 2,
'exitGrabSameButtonOnly': true,
'expandGridSize': 200
})
obj.stepSize = 1
let viewportWidth = grid.parentElement.clientWidth
let viewportHeight = grid.parentElement.clientHeight
grid.style.setProperty('--ueb-translateX', Math.round(viewportWidth / 2))
grid.style.setProperty('--ueb-translateY', Math.round(viewportHeight / 2))
grid.style.setProperty('--ueb-additionalX', 0)
grid.style.setProperty('--ueb-additionalY', 0)
})
});*/
</script>
</body>
</html>