Created
November 27, 2021 15:57
-
-
Save realFranco/2aed83e80f0a7ca0fe15f652886bb3a8 to your computer and use it in GitHub Desktop.
Traverse into one element to another #jArchi
This file contains hidden or 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
// Naive Graph Traversing. | |
console.log("edit a property from a relation"); | |
$("#id-733e2449d19b455db12241633b28cdab").prop("top_bottom", 0); | |
$("#id-733e2449d19b455db12241633b28cdab").prop("bottom_top", 0); | |
console.log("every input relation from the current element"); | |
$(ID).inRels().each(function(relation) { | |
if (relation.name){ | |
console.log(relation); | |
console.log(relation.id); | |
console.log(relation.name); | |
console.log(relation.prop("top_bottom")); | |
console.log(relation.prop("bottom_top")); | |
// | |
console.log("source: " + relation.source); | |
console.log("source id: " + relation.source.id); | |
console.log("target: " + relation.target); | |
console.log("target id: " + relation.target.id); | |
} | |
}); | |
console.log("END\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment