removed random console.logs
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
c0ea9eb319
commit
35f6c1382f
|
@ -1,5 +1,3 @@
|
||||||
console.log("and");
|
|
||||||
|
|
||||||
class and {
|
class and {
|
||||||
constructor(id) {
|
constructor(id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -20,7 +18,6 @@ class and {
|
||||||
};
|
};
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
};
|
};
|
||||||
//design
|
//design
|
||||||
|
|
|
@ -20,7 +20,6 @@ function buffer(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
console.log("nut");
|
|
||||||
|
|
||||||
function but(id) {
|
function but(id) {
|
||||||
this.wait = true;
|
this.wait = true;
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -21,7 +19,6 @@ function but(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
let l_count = 0;
|
let l_count = 0;
|
||||||
let lines = [];
|
let lines = [];
|
||||||
console.log("started2");
|
|
||||||
|
|
||||||
function edge(start, end) {
|
function edge(start, end) {
|
||||||
this.id = l_count.toString() + "line";
|
this.id = l_count.toString() + "line";
|
||||||
l_count++;
|
l_count++;
|
||||||
this.start = start;
|
this.start = start;
|
||||||
this.end = end;
|
this.end = end;
|
||||||
console.log(start + end);
|
|
||||||
|
|
||||||
console.log(this.end);
|
|
||||||
console.log(this.start);
|
|
||||||
|
|
||||||
lines[lines.length] = this;
|
lines[lines.length] = this;
|
||||||
|
|
||||||
let g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
let g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
||||||
|
@ -33,7 +27,6 @@ function edge(start, end) {
|
||||||
let elem = document.getElementById("svg1");
|
let elem = document.getElementById("svg1");
|
||||||
elem.appendChild(g);
|
elem.appendChild(g);
|
||||||
|
|
||||||
//console.log("succes"+lines);
|
|
||||||
|
|
||||||
this.rep = el;
|
this.rep = el;
|
||||||
this.name = "#" + this.id;
|
this.name = "#" + this.id;
|
||||||
|
@ -42,7 +35,6 @@ function edge(start, end) {
|
||||||
let adr = this.start.name;
|
let adr = this.start.name;
|
||||||
let temp = $(adr).attr("x");
|
let temp = $(adr).attr("x");
|
||||||
let n = this.name;
|
let n = this.name;
|
||||||
//console.log("updating"+adr+temp+n);
|
|
||||||
temp = (parseFloat(temp)).toString();
|
temp = (parseFloat(temp)).toString();
|
||||||
$(n).attr("x1", temp);
|
$(n).attr("x1", temp);
|
||||||
temp = $(adr).attr("y");
|
temp = $(adr).attr("y");
|
||||||
|
|
|
@ -69,7 +69,6 @@ $("svg").on("mousemove touchmove", function(e) {
|
||||||
|
|
||||||
xbeg += xvb;
|
xbeg += xvb;
|
||||||
ybeg += yvb;
|
ybeg += yvb;
|
||||||
console.log("started zooming" + xbeg + "and" + ybeg);
|
|
||||||
//moveing = (moveing +1)%2;
|
//moveing = (moveing +1)%2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +82,6 @@ $("svg").on("mousemove touchmove", function(e) {
|
||||||
yvb -= newy - ybeg;
|
yvb -= newy - ybeg;
|
||||||
updatescr();
|
updatescr();
|
||||||
|
|
||||||
console.log(xvb + "newx" + newx + "xbeg" + xbeg);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
console.log("bulb");
|
|
||||||
|
|
||||||
function light(id) {
|
function light(id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
let g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
let g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
||||||
|
@ -40,7 +38,6 @@ function light(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("cy"));
|
return parseFloat($(name).attr("cy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +54,6 @@ function light(id) {
|
||||||
$((this.rep)).attr("fill", "white");
|
$((this.rep)).attr("fill", "white");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log($((this.rep)).attr("fill"));
|
|
||||||
let x = this.x();
|
let x = this.x();
|
||||||
let y = this.y();
|
let y = this.y();
|
||||||
this.i.set(x - 60, y - 10);
|
this.i.set(x - 60, y - 10);
|
||||||
|
|
|
@ -108,7 +108,6 @@ $("body").on("mousemove touchmove", function(e) {
|
||||||
});
|
});
|
||||||
$("body").on("mouseup touchend", function(e) {
|
$("body").on("mouseup touchend", function(e) {
|
||||||
selected = "yay";
|
selected = "yay";
|
||||||
console.log("got a mouse up");
|
|
||||||
});
|
});
|
||||||
$("body").on("mousedown touchstart", function(e) {
|
$("body").on("mousedown touchstart", function(e) {
|
||||||
//beeing sure that we actually want to drag something
|
//beeing sure that we actually want to drag something
|
||||||
|
@ -193,7 +192,6 @@ function set_position(name, x, y) {
|
||||||
x = Math.floor(x / 80) * 80;
|
x = Math.floor(x / 80) * 80;
|
||||||
y = Math.floor(y / 80) * 80;
|
y = Math.floor(y / 80) * 80;
|
||||||
}
|
}
|
||||||
//console.log("obj:"+obj+"objx:"+objx+"objy:"+objy+"xdif:"+xdif+"ydif:"+ydif)
|
|
||||||
//setting the new positions
|
//setting the new positions
|
||||||
$(obj).attr("x", (x).toString());
|
$(obj).attr("x", (x).toString());
|
||||||
$(obj).attr("y", (y).toString());
|
$(obj).attr("y", (y).toString());
|
||||||
|
@ -219,7 +217,6 @@ function set_position(name, x, y) {
|
||||||
x = Math.floor(x / 80) * 80 + 40;
|
x = Math.floor(x / 80) * 80 + 40;
|
||||||
y = Math.floor(y / 80) * 80 + 40;
|
y = Math.floor(y / 80) * 80 + 40;
|
||||||
}
|
}
|
||||||
//console.log("obj:"+obj+"objx:"+objx+"objy:"+objy+"xdif:"+xdif+"ydif:"+ydif)
|
|
||||||
//setting the new positions
|
//setting the new positions
|
||||||
$(obj).attr("cx", (x).toString());
|
$(obj).attr("cx", (x).toString());
|
||||||
$(obj).attr("cy", (y).toString());
|
$(obj).attr("cy", (y).toString());
|
||||||
|
@ -254,8 +251,6 @@ function add(h, w, color, stroke, id, on) {
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(pieces);
|
|
||||||
|
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
for (let i = 0; i < pieces.length; i++) {
|
for (let i = 0; i < pieces.length; i++) {
|
||||||
pieces[i].update();
|
pieces[i].update();
|
||||||
|
|
|
@ -21,7 +21,6 @@ function nand(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ function nand3(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ function not(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ function or(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,7 @@ function clicked(ob) {
|
||||||
} else {
|
} else {
|
||||||
sele = ob;
|
sele = ob;
|
||||||
}
|
}
|
||||||
console.log("click" + sels + sele + ob.type);
|
|
||||||
if ((sels != "yay") && (sele != "yay")) {
|
if ((sels != "yay") && (sele != "yay")) {
|
||||||
console.log("step 2");
|
|
||||||
if ((sels.state)) {
|
if ((sels.state)) {
|
||||||
sels.nei = sele;
|
sels.nei = sele;
|
||||||
sels.state = false;
|
sels.state = false;
|
||||||
|
@ -61,7 +59,6 @@ function clicked(ob) {
|
||||||
a = new edge(sels, sele);
|
a = new edge(sels, sele);
|
||||||
sels = "yay";
|
sels = "yay";
|
||||||
sele = "yay";
|
sele = "yay";
|
||||||
console.log("end");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,6 @@ function xor(id) {
|
||||||
|
|
||||||
this.y = function() {
|
this.y = function() {
|
||||||
let name = "#" + this.id;
|
let name = "#" + this.id;
|
||||||
//console.log("y"+parseFloat($(name).attr("y")));
|
|
||||||
return parseFloat($(name).attr("y"));
|
return parseFloat($(name).attr("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue