mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-02-16 02:30:51 +00:00
Fixed shrt path algorithm name for graphs with negative edges. Fix loader.
This commit is contained in:
@@ -30,7 +30,7 @@ function loadAsyncAlgorithms(onFinish) {
|
||||
"ShortestPath.js",
|
||||
"VerticesDegree.js"];
|
||||
|
||||
doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin + "?v=" + globalVersion, modulDir)), onFinish);
|
||||
doIncludeAsync (pluginsList.map((plugin) => include ("model/plugins/" + plugin, modulDir)), onFinish);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ FindShortPathNew.prototype.infinityValue = 1E9 - 1;
|
||||
|
||||
FindShortPathNew.prototype.getName = function(local)
|
||||
{
|
||||
return g_findShortPathName; //local == "ru" ? "Поиск кратчайший путь алгоритмом Дейкстры" : "Find shortest path using Dijkstra's algorithm";
|
||||
return this.graph.hasNegative() ? g_findShortPathBellmanFordName : g_findShortPathName; //local == "ru" ? "Поиск кратчайший путь алгоритмом Дейкстры" : "Find shortest path using Dijkstra's algorithm";
|
||||
}
|
||||
|
||||
FindShortPathNew.prototype.getId = function()
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -129,6 +129,7 @@ var g_minimumSpanningTree = "Search of minimum spanning tree";
|
||||
var g_modernGraphStyleName = "Visualization based on weight";
|
||||
var g_RadiusAndDiameter = "Search graph radius and diameter";
|
||||
var g_findShortPathName = "Find shortest path using Dijkstra's algorithm";
|
||||
var g_findShortPathBellmanFordName = "Find shortest path using Bellman–Ford algorithm";
|
||||
var g_VerticesDegreeName = "Calculate vertices degree";
|
||||
var g_SpanningTreeResult = "Min Spanning Tree is";
|
||||
var g_SpanningTreeIgnoreDir = "We ignored edges direction for calculation";
|
||||
@@ -340,6 +341,7 @@ function loadTexts()
|
||||
g_modernGraphStyleName = document.getElementById("modernGraphStyleName").innerHTML;
|
||||
g_RadiusAndDiameter = document.getElementById("RadiusAndDiameter").innerHTML;
|
||||
g_findShortPathName = document.getElementById("findShortPathName").innerHTML;
|
||||
g_findShortPathBellmanFordName = document.getElementById("findShortPathBellmanFordName").innerHTML;
|
||||
g_VerticesDegreeName = document.getElementById("VerticesDegreeName").innerHTML;
|
||||
|
||||
g_SpanningTreeResult = document.getElementById("MinSpanningTreeResult").innerHTML;
|
||||
|
||||
@@ -533,7 +533,7 @@ Editor.prototype.initAlgorithmList = function()
|
||||
if (!event.originalEvent.closeThisMenu) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
});
|
||||
$(window).on('click', function() {
|
||||
$('#algorithmList').slideUp();
|
||||
});
|
||||
@@ -644,6 +644,10 @@ Editor.prototype.createAlgorithmMenu = function()
|
||||
else
|
||||
{
|
||||
$(data.object).show();
|
||||
|
||||
// Update button text
|
||||
var textSpan = data.object.getElementsByTagName("span")[1];
|
||||
textSpan.innerHTML = algorithm.getName();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Global version needs to force reload scripts from server.
|
||||
let globalVersion = 78;
|
||||
let globalVersion = 79;
|
||||
|
||||
var include = function(filename, localDir) {
|
||||
return {filename: filename, localDir: localDir};
|
||||
|
||||
Reference in New Issue
Block a user