stash the tree attempt code before deleting

This commit is contained in:
BroodjeAap 2022-08-01 17:09:04 +00:00
parent 6591a0fb79
commit e2744bcaf7
4 changed files with 26 additions and 7 deletions

View file

@ -52,6 +52,10 @@ document.addEventListener("DOMContentLoaded", function (event) {
[].forEach.call(inputs, function (input) {
input.onmousedown = log;
});
var outputs = document.getElementsByClassName("node-output");
[].forEach.call(outputs, function (output) {
output.onmousedown = log;
});
var c = document.getElementById("node-canvas");
var ctx = c.getContext("2d");
if (ctx === null) {

View file

@ -64,6 +64,10 @@ document.addEventListener("DOMContentLoaded", function(event) {
[].forEach.call(inputs, function(input: HTMLElement){
input.onmousedown = log;
});
let outputs = document.getElementsByClassName("node-output");
[].forEach.call(outputs, function(output: HTMLElement){
output.onmousedown = log;
});
let c = document.getElementById("node-canvas") as HTMLCanvasElement;
let ctx = c.getContext("2d");

View file

@ -32,15 +32,26 @@
.node-input {
background-color: red;
-webkit-user-select:none;
-moz-user-select:-moz-none;
-ms-user-select:none;
user-select:none;
cursor: pointer;
}
.node-outputs {
float: right;
}
.node-output {
margin-bottom: 1rem;
background-color: red;
-webkit-user-select:none;
-moz-user-select:-moz-none;
-ms-user-select:none;
user-select:none;
cursor: pointer;
}
#node-canvas {

View file

@ -1,8 +1,13 @@
{{define "content"}}
<canvas id="node-canvas" width="1000px" height="1000px">
<div class="sec1">
<div class="svg-container">
<canvas id="node-canvas" width="10000" height="10000">
</canvas>
</div>
</div>
</canvas>
<div class="card node-card">
<div class="card-header text-center">
@ -48,11 +53,6 @@
</div>
</div>
<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
<path d="M 10 10 C 100 10, 100 10, 100 100" stroke="black" fill="transparent"/>
</svg>
{{end}}
{{define "scripts"}}