|
|
|
@ -28,7 +28,7 @@
|
|
|
|
|
</header>
|
|
|
|
|
<div id="container"></div>
|
|
|
|
|
<script>
|
|
|
|
|
var switchs = [], lineCount = [], logiques = [],lines = [];
|
|
|
|
|
var switchs = [], lineCount = [], logiques = [],lines = [], endLines = [],end;
|
|
|
|
|
|
|
|
|
|
var layer = new Konva.Layer();
|
|
|
|
|
|
|
|
|
@ -47,18 +47,27 @@
|
|
|
|
|
createLogique(200, 100, "logique1","et");
|
|
|
|
|
createLogique(300,200,"logique2","ou");
|
|
|
|
|
createLogique(500,300,"logique3","et");
|
|
|
|
|
createSwitch("s1", 20, 20,2,2);
|
|
|
|
|
createLogique(500,400,"logique4","et");
|
|
|
|
|
|
|
|
|
|
createSwitch("s1", 20, 20);
|
|
|
|
|
createSwitch("s2", 20, 90);
|
|
|
|
|
createSwitch("s3", 20, 300);
|
|
|
|
|
createSwitch("s4", 20, 500);
|
|
|
|
|
|
|
|
|
|
createLink(stage.findOne("#s3"), findLogique("logique2"),3);
|
|
|
|
|
createLink(stage.findOne("#s2"), findLogique("logique1"),1);
|
|
|
|
|
createLink(stage.findOne("#s1"), findLogique("logique1"),0);
|
|
|
|
|
createLink(findLogique("logique1"),findLogique("logique2"),2);
|
|
|
|
|
createLink(stage.findOne("#s4"), findLogique("logique3"),4);
|
|
|
|
|
createLink(findLogique("logique2"),findLogique("logique3"),5);
|
|
|
|
|
createSwitch("s5", 20, 700);
|
|
|
|
|
createSwitch("s6", 20, 600);
|
|
|
|
|
createLink(stage.findOne("#s5"), findLogique("logique4"));
|
|
|
|
|
createLink(stage.findOne("#s6"), findLogique("logique4"));
|
|
|
|
|
createLink(stage.findOne("#s3"), findLogique("logique2"));
|
|
|
|
|
createLink(stage.findOne("#s2"), findLogique("logique1"));
|
|
|
|
|
createLink(stage.findOne("#s1"), findLogique("logique1"));
|
|
|
|
|
createLink(findLogique("logique1"),findLogique("logique2"));
|
|
|
|
|
createLink(stage.findOne("#s4"), findLogique("logique3"));
|
|
|
|
|
createLink(findLogique("logique2"),findLogique("logique3"));
|
|
|
|
|
initAllSwitch();
|
|
|
|
|
createEnd(800, 320);
|
|
|
|
|
initEnd();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|