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
// | |
// Generate diagram legend | |
// | |
// 2020 David GERARD | |
// | |
// For a selected view, create a group named 'Legend', in which will be nested for each concepts type found in view | |
// - a concept, specifically sized to show the pictogram | |
// - a note, to be used to name or explain the concept specifically in the view, hence preventing to rename the concept | |
// That way, | |
// - a model will be a bit polluted but with a specific set of concepts, for legend purpose, prefixed so easily identifiable |
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) { |
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
/* | |
Sourced: https://gist.github.com/rich-biker/9a3c86c5a576ce0d8639856f3ee81651 | |
Script: Documentation Generation | |
Purpose: To generate output based on a driving view | |
Author: Richard Heward - Tame Blue Lion Ltd | |
This generates a markdown file with the embedded images and text based upon a driving view in Archi of groups that trigger each other and embedded views. | |
See my blog for a more detailed explaination. https://www.tamebluelion.co.uk/blog/archi-documentation |