ahh - and one more note: in your posted code the switch-statement:
is wrong ... it should look like:
Code:
switch(actionType) { case 0: addNode(); break; case 1: if (currentPgraphCount > 0) { delNode(); break; } case 2: if (currentPgraphCount > 0) { insertNode(); break; } case 3: if (currentPgraphCount > 0) { replaceNode(); break } default: alert("Nenhuma opção foi escolhida !"); }
Code:
switch( actionType ) { case 0: addNode(); break; case 1: if (currentPgraphCount > 0) { delNode(); } break; case 2: if (currentPgraphCount > 0) { insertNode(); } break; case 3: if (currentPgraphCount > 0) { replaceNode(); } break; default: alert("Nenhuma opção foi escolhida !"); break; }
Comment