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
function convert(selection, convertToType) { | |
var relaxed = window.confirm('By default, selected concepts are converted, and relationships involving them that would no more be valid are converted to associations. Click Ok for this behavior or Cancel if you want a "strict" mode where relationships are not changed.'); | |
$(selection).each(function(o) { | |
$(concept(o)).outRels().each(function(r) { | |
if (! $.model.isAllowedRelationship(r.type, convertToType, r.target.type)) { | |
checkAndConvertRelationship(r, relaxed); | |
} | |
}); | |
$(concept(o)).inRels().each(function(r) { |