fix: Typo for documents and comments

This commit is contained in:
yutotnh
2022-06-22 12:39:10 +09:00
parent 566ec14648
commit ca909edbed
29 changed files with 43 additions and 43 deletions

View File

@@ -23,7 +23,7 @@ flowchart
The new nodes C1 and C2 are a special type of nodes, clusterNodes. ClusterNodes have have the nodes in the cluster including the cluster attached in a graph object.
When rendering this diagram it it beeing rendered recursivly. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster.
When rendering this diagram it it beeing rendered recursively. The diagram is rendered by the dagre-mermaid:render function which in turn will be used to render the node C1 and the node C2. The result of those renderings will be inserted as nodes in the "root" diagram. With this recursive approach it would be possible to have different layout direction for each cluster.
```
{ clusterNode: true, graph }
@@ -74,7 +74,7 @@ This is set by the renderer of the diagram and insert the data that the wrapper
| property | description |
| ---------- | ----------------------------------------------------------------------------------------------------------- |
| labelStyle | Css styles for the label. User for instance for stylling the labels for clusters |
| labelStyle | Css styles for the label. User for instance for styling the labels for clusters |
| shape | The shape of the node. |
| labelText | The text on the label |
| rx | The corner radius - maybe part of the shape instead? Used for rects. |

View File

@@ -78,7 +78,7 @@ const rect = (parent, node) => {
};
/**
* Non visiable cluster where the note is group with its
* Non visible cluster where the note is group with its
*
* @param {any} parent
* @param {any} node

View File

@@ -313,7 +313,7 @@ const cutPathAtIntersect = (_points, boundryNode) => {
// check if point is inside the boundry rect
if (!outsideNode(boundryNode, point) && !isInside) {
// First point inside the rect found
// Calc the intersection coord between the point anf the last opint ouside the rect
// Calc the intersection coord between the point anf the last point outside the rect
const inter = intersection(boundryNode, lastPointOutside, point);
log.warn('abc88 inside', point, lastPointOutside, inter);
log.warn('abc88 intersection', inter);
@@ -391,7 +391,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph
// }
// isInside = true;
// } else {
// // outtside
// // outside
// lastPointOutside = point;
// if (!isInside) points.push(point);
// }

View File

@@ -61,7 +61,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => {
log.warn('Recursive render complete ', newEl, node);
} else {
if (graph.children(v).length > 0) {
// This is a cluster but not to be rendered recusively
// This is a cluster but not to be rendered recursively
// Render as before
log.info('Cluster - the non recursive path XXX', v, node.id, node, graph);
log.info(findNonClusterChild(node.id, graph));
@@ -117,7 +117,7 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => {
} else {
// Non cluster node
if (graph.children(v).length > 0) {
// A cluster in the non-recurive way
// A cluster in the non-recursive way
// positionCluster(node);
insertCluster(clusters, node);
clusterDb[node.id].node = node;

View File

@@ -244,7 +244,7 @@ const barb = (elem, type) => {
.attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');
};
// TODO rename the class diagram markers to something shape descriptive and semanitc free
// TODO rename the class diagram markers to something shape descriptive and semantic free
const markers = {
extension,
composition,

View File

@@ -210,7 +210,7 @@ export const adjustClustersAndEdges = (graph, depth) => {
} else {
log.debug('Opting in, graph ');
}
// Go through the nodes and for each cluster found, save a replacment node, this can be used when
// Go through the nodes and for each cluster found, save a replacement node, this can be used when
// faking a link to a cluster
graph.nodes().forEach(function (id) {
const children = graph.children(id);
@@ -257,7 +257,7 @@ export const adjustClustersAndEdges = (graph, depth) => {
});
// For clusters with incoming and/or outgoing edges translate those edges to a real node
// in the cluster inorder to fake the edge
// in the cluster in order to fake the edge
graph.edges().forEach(function (e) {
const edge = graph.edge(e);
log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));

View File

@@ -877,7 +877,7 @@ const class_box = (parent, node) => {
);
verticalPos = interfaceBBox.height + rowPadding;
}
// Positin the class title label
// Position the class title label
let diffX = (maxWidth - classTitleBBox.width) / 2;
select(classTitleLabel).attr(
'transform',

View File

@@ -45,7 +45,7 @@ const dots = (elem, type) => {
.attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');
};
// TODO rename the class diagram markers to something shape descriptive and semanitc free
// TODO rename the class diagram markers to something shape descriptive and semantic free
const patterns = {
dots,
};

View File

@@ -568,7 +568,7 @@ function drawInsideBoundary(diagram, parentBoundaryAlias, parentBounds, currentB
export const draw = function (text, id) {
conf = configApi.getConfig().c4;
const securityLevel = configApi.getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -315,7 +315,7 @@ const drawBoundary = function (elem, boundary, conf) {
drawRect(boundaryElem, rectData);
// draw lable
// draw label
let boundaryConf = conf.boundaryFont();
boundaryConf.fontWeight = 'bold';
boundaryConf.fontSize = boundaryConf.fontSize + 2;

View File

@@ -138,7 +138,7 @@ export const addClasses = function (classes, g) {
};
/**
* Add edges to graph based on parsed graph defninition
* Add edges to graph based on parsed graph definition
*
* @param relations
* @param {object} g The graph object
@@ -317,7 +317,7 @@ export const draw = function (text, id) {
// flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
// }
// Fetch the verices/nodes and edges/links from the parsed graph definition
// Fetch the vertices/nodes and edges/links from the parsed graph definition
const classes = classDb.getClasses();
const relations = classDb.getRelations();

View File

@@ -168,7 +168,7 @@ export const draw = function (text, id) {
log.info('Rendering diagram ' + text);
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -547,7 +547,7 @@ export const draw = function (text, id) {
const parser = erParser.parser;
parser.yy = erDb;
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);
@@ -575,7 +575,7 @@ export const draw = function (text, id) {
// ---
// 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)
// 2. Make sure they are all added to the graph
// 3. Add all the edges (relationships) to the graph aswell
// 3. Add all the edges (relationships) to the graph as well
// 4. Let dagre do its magic to layout the graph. This assigns:
// - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships
// - the path co-ordinates for each edge

View File

@@ -465,7 +465,7 @@ export const addSubGraph = function (_id, list, _title) {
const prims = { boolean: {}, number: {}, string: {} };
const objs = [];
let dir; // = unbdefined; direction.trim();
let dir; // = undefined; direction.trim();
const nodeList = a.filter(function (item) {
const type = typeof item;
if (item.stmt && item.stmt === 'dir') {

View File

@@ -30,7 +30,7 @@ export const draw = function (text, id) {
parser.parse(text);
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -65,9 +65,9 @@ const drawText = (txt) => {
};
/**
* Draws the commits with its symbol and labels. The function has tywo modes, one which only
* Draws the commits with its symbol and labels. The function has two modes, one which only
* calculates the positions and one that does the actual drawing. This for a simple way getting the
* vertical leyering rcorrect in the graph.
* vertical layering correct in the graph.
*
* @param {any} svg
* @param {any} commits
@@ -345,7 +345,7 @@ const findLane = (y1, y2, _depth) => {
};
/**
* This function draw trhe lines between the commits. They were arrows initially.
* This function draw the lines between the commits. They were arrows initially.
*
* @param {any} svg
* @param {any} commit1

View File

@@ -28,7 +28,7 @@ export const draw = (text, id, version) => {
log.debug('Renering info diagram\n' + text);
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -25,7 +25,7 @@ export const draw = (txt, id) => {
log.debug('Rendering info diagram\n' + txt);
const securityLevel = configApi.getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -324,7 +324,7 @@ export const draw = (text, id) => {
parser.parse(text);
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -587,7 +587,7 @@ function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoop
export const draw = function (text, id) {
conf = configApi.getConfig().sequence;
const securityLevel = configApi.getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -362,7 +362,7 @@ export const drawNote = (text, g) => {
/**
* Starting point for drawing a state. The function finds out the specifics about the state and
* renders with approprtiate function.
* renders with appropriate function.
*
* @param {any} elem
* @param {any} stateDef

View File

@@ -48,7 +48,7 @@ const insertMarkers = function (elem) {
export const draw = function (text, id) {
conf = getConfig().state;
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -56,7 +56,7 @@ export const draw = function (text, id) {
parser.parse(text + '\n');
const securityLevel = getConfig().securityLevel;
// Handle root and ocument for when rendering in sanbox mode
// Handle root and Document for when rendering in sanbox mode
let sandboxElement;
if (securityLevel === 'sandbox') {
sandboxElement = select('#i' + id);

View File

@@ -5,7 +5,7 @@ class Theme {
/** # Base variables */
/**
* - Background - used to know what the background color is of the diagram. This is used for
* deducing colors for istance line color. Defaulr value is #f4f4f4.
* deducing colors for instance line color. Default value is #f4f4f4.
*/
this.background = '#f4f4f4';
this.darkMode = false;
@@ -21,7 +21,7 @@ class Theme {
this.fontSize = '16px';
}
updateColors() {
// The || is to make sure that if the variable has been defiend by a user override that value is to be used
// The || is to make sure that if the variable has been defined by a user override that value is to be used
/* Main */
this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor);
@@ -103,7 +103,7 @@ class Theme {
/* state colors */
this.transitionColor = this.transitionColor || this.lineColor;
this.transitionLabelColor = this.transitionLabelColor || this.textColor;
/* The color of the text tables of the tstates*/
/* The color of the text tables of the states*/
this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
this.stateBkg = this.stateBkg || this.mainBkg;