You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
990 B
41 lines
990 B
function initAllSwitch() {
|
|
switchs.forEach(function (element) {
|
|
let switche = stage.findOne("#" + element);
|
|
switche.on('click', function () {
|
|
|
|
let colorrect = switche.fill() == colorSwitchInnactiveBackground ? colorSwitchActiveBackground : colorSwitchInnactiveBackground;
|
|
switche.fill(colorrect);
|
|
changeLineColor(switche.id3);
|
|
checkAllSortieLogique();
|
|
layer.draw();
|
|
checkEnd();
|
|
});
|
|
switche.on('mouseover', function () {
|
|
document.body.style.cursor = "pointer";
|
|
});
|
|
switche.on('mouseout', function () {
|
|
document.body.style.cursor = "default";
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
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);
|
|
}
|
|
});
|
|
} |