amélioration des lignes, pour éviter les lignes continue, ajout d'une arrivé de niveau pouvant acceuillir un nombre infini de lignes
parent
988a6e835d
commit
7887900dda
After Width: | Height: | Size: 2.4 MiB |
After Width: | Height: | Size: 241 KiB |
@ -1,22 +1,38 @@
|
|||||||
function initAllSwitch(){
|
function initAllSwitch() {
|
||||||
switchs.forEach(function(element){
|
switchs.forEach(function (element) {
|
||||||
let switche = stage.findOne("#"+element);
|
let switche = stage.findOne("#" + element);
|
||||||
switche.on('click', function () {
|
switche.on('click', function () {
|
||||||
let colorrect = switche.fill() == colorSwitchInnactiveBackground ? colorSwitchActiveBackground : colorSwitchInnactiveBackground;
|
let colorrect = switche.fill() == colorSwitchInnactiveBackground ? colorSwitchActiveBackground : colorSwitchInnactiveBackground;
|
||||||
switche.fill(colorrect);
|
switche.fill(colorrect);
|
||||||
changeLineColor(switche.id3);
|
changeLineColor(switche.id3);
|
||||||
checkAllSortieLogique();
|
checkAllSortieLogique();
|
||||||
layer.draw();
|
layer.draw();
|
||||||
});
|
});
|
||||||
switche.on('mouseover', function () {
|
switche.on('mouseover', function () {
|
||||||
document.body.style.cursor = "pointer";
|
document.body.style.cursor = "pointer";
|
||||||
});
|
});
|
||||||
switche.on('mouseout', function () {
|
switche.on('mouseout', function () {
|
||||||
document.body.style.cursor = "default";
|
document.body.style.cursor = "default";
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
function initLayer() {
|
});
|
||||||
createEnd(500,50);
|
}
|
||||||
}
|
function initLayer() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function initEnd() {
|
||||||
|
let countLogique = 0;
|
||||||
|
logiques.forEach(function (element) {
|
||||||
|
if(element.id3 == null){
|
||||||
|
countLogique++;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
end.position = countLogique;
|
||||||
|
end.let = countLogique;
|
||||||
|
logiques.forEach(function (element) {
|
||||||
|
if(element.id3 == null){
|
||||||
|
createLink(element,end);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in new issue