-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- moved connect/disconnect functions, as if few graph exists, it woul…
…d be easier to manage this way - thanks to above, helpers aren't needed anymore if user doesn't visualise graph using objects
- Loading branch information
Showing
10 changed files
with
55 additions
and
57 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
/// @param {String} a | ||
/// @param {String} b | ||
function connect_points(gr, a, b){ | ||
|
||
if (a == b) return false; | ||
|
||
var _va = gr.get_vertex(a); | ||
var _vb = gr.get_vertex(b); | ||
var _dist = objects_distance_by_name(a, b); | ||
|
||
if (_va and _vb) { | ||
_va.connect(_vb, _dist); | ||
_vb.connect(_va, _dist); // back-version of connection | ||
} else { | ||
throw "one of vertices " + string(a) + "," + string(b) +" was not found"; | ||
} | ||
|
||
return true; | ||
return gr.connect(a, b, objects_distance_by_name(a, b)); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.