stash the tree attempt code before deleting
This commit is contained in:
parent
6591a0fb79
commit
e2744bcaf7
4 changed files with 26 additions and 7 deletions
|
@ -52,6 +52,10 @@ document.addEventListener("DOMContentLoaded", function (event) {
|
||||||
[].forEach.call(inputs, function (input) {
|
[].forEach.call(inputs, function (input) {
|
||||||
input.onmousedown = log;
|
input.onmousedown = log;
|
||||||
});
|
});
|
||||||
|
var outputs = document.getElementsByClassName("node-output");
|
||||||
|
[].forEach.call(outputs, function (output) {
|
||||||
|
output.onmousedown = log;
|
||||||
|
});
|
||||||
var c = document.getElementById("node-canvas");
|
var c = document.getElementById("node-canvas");
|
||||||
var ctx = c.getContext("2d");
|
var ctx = c.getContext("2d");
|
||||||
if (ctx === null) {
|
if (ctx === null) {
|
||||||
|
|
|
@ -64,6 +64,10 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
[].forEach.call(inputs, function(input: HTMLElement){
|
[].forEach.call(inputs, function(input: HTMLElement){
|
||||||
input.onmousedown = log;
|
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 c = document.getElementById("node-canvas") as HTMLCanvasElement;
|
||||||
let ctx = c.getContext("2d");
|
let ctx = c.getContext("2d");
|
||||||
|
|
|
@ -32,15 +32,26 @@
|
||||||
|
|
||||||
.node-input {
|
.node-input {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:-moz-none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-outputs {
|
.node-outputs {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.node-output {
|
.node-output {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
-webkit-user-select:none;
|
||||||
|
-moz-user-select:-moz-none;
|
||||||
|
-ms-user-select:none;
|
||||||
|
user-select:none;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#node-canvas {
|
#node-canvas {
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
{{define "content"}}
|
{{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>
|
</canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="card node-card">
|
<div class="card node-card">
|
||||||
<div class="card-header text-center">
|
<div class="card-header text-center">
|
||||||
|
@ -48,11 +53,6 @@
|
||||||
</div>
|
</div>
|
||||||
</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}}
|
{{end}}
|
||||||
|
|
||||||
{{define "scripts"}}
|
{{define "scripts"}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue