Files
P42_UI/app/assets/html/test.html
T

39 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>graflow</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link type="text/css" rel="stylesheet" href="https://threejs.org/examples/main.css">
<link type="text/css" rel="stylesheet" href="../../thirdparty/buildoz/buildoz.css">
<script src="../../thirdparty/buildoz/buildoz.js"></script>
<script src="../../thirdparty/buildoz/bzGraflow.js"></script>
<style>
bz-graflow{
overflow: scroll;
border: 5px ridge #4BABFF;
width: 70vw;
height: 70vh;
}
</style>
<script>
window.addEventListener('load',()=>{
const grflw = document.querySelector('bz-graflow')
document.querySelector('[data-trigger="onAutoplaceH"]').addEventListener('click',
(evt) => { grflw.autoPlace('horizontal') }
)
document.querySelector('[data-trigger="onAutoplaceV"]').addEventListener('click',
(evt) => { grflw.autoPlace('vertical') }
)
})
</script>
</head>
<body>
<bz-graflow flow="/app/assets/json/bzGraflow/testFlow1.json" tension="60"></bz-graflow>
<button data-trigger="onAutoplaceH">auto-place Horizontal</button>
<button data-trigger="onAutoplaceV">auto-place Vertical</button>
</body>
</html>