dijakstra algoritm visual implemented using js canvas