Skip to content

Commit

Permalink
chore(Modeling): name templates according to convention
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme authored and nikku committed Apr 18, 2023
1 parent d278b44 commit 697b2a1
Showing 1 changed file with 67 additions and 67 deletions.
134 changes: 67 additions & 67 deletions lib/features/modeling/Modeling.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ import { isModelElement } from '../../model';
*/

/**
* @template {Element} E
* @template {Element} U
*
* @typedef { {
* elements: E[],
* elements: U[],
* range: {
* min: number;
* max: number;
Expand All @@ -87,11 +87,11 @@ import { isModelElement } from '../../model';
/**
* The basic modeling entry point.
*
* @template {Connection} [C=Connection]
* @template {Element} [E=Element]
* @template {Label} [L=Label]
* @template {Parent} [P=Parent]
* @template {Shape} [S=Shape]
* @template {Connection} [T=Connection]
* @template {Element} [U=Element]
* @template {Label} [V=Label]
* @template {Parent} [W=Parent]
* @template {Shape} [X=Shape]
*
* @param {EventBus} eventBus
* @param {ElementFactory} elementFactory
Expand Down Expand Up @@ -167,9 +167,9 @@ Modeling.prototype.registerHandlers = function(commandStack) {
/**
* Move a shape by the given delta and optionally to a new parent.
*
* @param {S} shape
* @param {X} shape
* @param {Point} delta
* @param {P} [newParent]
* @param {W} [newParent]
* @param {number} [newParentIndex]
* @param {ModelingHints} [hints]
*/
Expand All @@ -195,8 +195,8 @@ Modeling.prototype.moveShape = function(shape, delta, newParent, newParentIndex,
/**
* Update the attachment of a shape.
*
* @param {S} shape
* @param {S} [newHost=undefined]
* @param {X} shape
* @param {X} [newHost=undefined]
*/
Modeling.prototype.updateAttachment = function(shape, newHost) {
var context = {
Expand All @@ -211,9 +211,9 @@ Modeling.prototype.updateAttachment = function(shape, newHost) {
/**
* Move elements by a given delta and optionally to a new parent.
*
* @param {E[]} shapes
* @param {U[]} shapes
* @param {Point} delta
* @param {P} [target]
* @param {W} [target]
* @param {ModelingMoveElementsHints} [hints]
*/
Modeling.prototype.moveElements = function(shapes, delta, target, hints) {
Expand Down Expand Up @@ -248,9 +248,9 @@ Modeling.prototype.moveElements = function(shapes, delta, target, hints) {
/**
* Move a shape by the given delta and optionally to a new parent.
*
* @param {C} connection
* @param {T} connection
* @param {Point} delta
* @param {P} [newParent]
* @param {W} [newParent]
* @param {number} [newParentIndex]
* @param {ModelingHints} [hints]
*/
Expand All @@ -275,7 +275,7 @@ Modeling.prototype.moveConnection = function(connection, delta, newParent, newPa
/**
* Layout a connection.
*
* @param {C} connection
* @param {T} connection
* @param {ModelingHints} [hints]
*/
Modeling.prototype.layoutConnection = function(connection, hints) {
Expand All @@ -292,26 +292,26 @@ Modeling.prototype.layoutConnection = function(connection, hints) {
*
* @overlord
*
* @param {E} source
* @param {E} target
* @param {Partial<C>} connection
* @param {P} parent
* @param {U} source
* @param {U} target
* @param {Partial<T>} connection
* @param {W} parent
* @param {ModelingHints} [hints]
*
* @return {C}
* @return {T}
*/

/**
* Create a connection.
*
* @param {E} source
* @param {E} target
* @param {U} source
* @param {U} target
* @param {number} parentIndex
* @param {Partial<C>} connection
* @param {P} parent
* @param {Partial<T>} connection
* @param {W} parent
* @param {ModelingHints} [hints]
*
* @return {C}
* @return {T}
*/
Modeling.prototype.createConnection = function(source, target, parentIndex, connection, parent, hints) {

Expand Down Expand Up @@ -344,24 +344,24 @@ Modeling.prototype.createConnection = function(source, target, parentIndex, conn
*
* @overlord
*
* @param {Partial<S>} shape
* @param {Partial<X>} shape
* @param {Point} position
* @param {P} target
* @param {W} target
* @param {ModelingCreateShapeHints} [hints]
*
* @return {S}
* @return {X}
*/

/**
* Create a shape.
*
* @param {Partial<S>} shape
* @param {Partial<X>} shape
* @param {Point} position
* @param {P} target
* @param {W} target
* @param {number} parentIndex
* @param {ModelingCreateShapeHints} [hints]
*
* @return {S}
* @return {X}
*/
Modeling.prototype.createShape = function(shape, position, target, parentIndex, hints) {

Expand Down Expand Up @@ -402,13 +402,13 @@ Modeling.prototype.createShape = function(shape, position, target, parentIndex,
/**
* Create elements.
*
* @param {Partial<E>[]} elements
* @param {Partial<U>[]} elements
* @param {Point} position
* @param {P} parent
* @param {W} parent
* @param {number} [parentIndex]
* @param {ModelingHints} [hints]
*
* @return {E[]}
* @return {U[]}
*/
Modeling.prototype.createElements = function(elements, position, parent, parentIndex, hints) {
if (!isArray(elements)) {
Expand Down Expand Up @@ -438,12 +438,12 @@ Modeling.prototype.createElements = function(elements, position, parent, parentI
/**
* Create a label.
*
* @param {E} labelTarget
* @param {U} labelTarget
* @param {Point} position
* @param {Partial<L>} label
* @param {P} [parent]
* @param {Partial<V>} label
* @param {W} [parent]
*
* @return {L}
* @return {V}
*/
Modeling.prototype.createLabel = function(labelTarget, position, label, parent) {

Expand All @@ -465,13 +465,13 @@ Modeling.prototype.createLabel = function(labelTarget, position, label, parent)
/**
* Create and connect a shape to a source.
*
* @param {E} source
* @param {Partial<S>} shape
* @param {U} source
* @param {Partial<X>} shape
* @param {Point} position
* @param {P} target
* @param {W} target
* @param {ModelingHints} [hints]
*
* @return {S}
* @return {X}
*/
Modeling.prototype.appendShape = function(source, shape, position, target, hints) {

Expand All @@ -497,7 +497,7 @@ Modeling.prototype.appendShape = function(source, shape, position, target, hints
/**
* Remove elements.
*
* @param {E[]} elements
* @param {U[]} elements
*/
Modeling.prototype.removeElements = function(elements) {
var context = {
Expand All @@ -510,7 +510,7 @@ Modeling.prototype.removeElements = function(elements) {
/**
* Distribute elements along a given axis.
*
* @param {ModelingDistributeGroup<E>[]} groups
* @param {ModelingDistributeGroup<U>[]} groups
* @param {ModelingDistributeAxis} axis
* @param {ModelingDistributeDimension} dimension
*/
Expand All @@ -527,7 +527,7 @@ Modeling.prototype.distributeElements = function(groups, axis, dimension) {
/**
* Remove a shape.
*
* @param {S} shape
* @param {X} shape
* @param {ModelingHints} [hints]
*/
Modeling.prototype.removeShape = function(shape, hints) {
Expand All @@ -542,7 +542,7 @@ Modeling.prototype.removeShape = function(shape, hints) {
/**
* Remove a connection.
*
* @param {C} connection
* @param {T} connection
* @param {ModelingHints} [hints]
*/
Modeling.prototype.removeConnection = function(connection, hints) {
Expand All @@ -557,11 +557,11 @@ Modeling.prototype.removeConnection = function(connection, hints) {
/**
* Replace a shape.
*
* @param {S} oldShape
* @param {Partial<S>} newShape
* @param {X} oldShape
* @param {Partial<X>} newShape
* @param {ModelingHints} [hints]
*
* @return {S}
* @return {X}
*/
Modeling.prototype.replaceShape = function(oldShape, newShape, hints) {
var context = {
Expand All @@ -578,7 +578,7 @@ Modeling.prototype.replaceShape = function(oldShape, newShape, hints) {
/**
* Align elements.
*
* @param {E[]} elements
* @param {U[]} elements
* @param {ModelingAlignAlignment} alignment
*/
Modeling.prototype.alignElements = function(elements, alignment) {
Expand All @@ -593,7 +593,7 @@ Modeling.prototype.alignElements = function(elements, alignment) {
/**
* Resize a shape.
*
* @param {S} shape
* @param {X} shape
* @param {Rect} newBounds
* @param {Dimensions} [minBounds]
* @param {ModelingHints} [hints]
Expand All @@ -612,8 +612,8 @@ Modeling.prototype.resizeShape = function(shape, newBounds, minBounds, hints) {
/**
* Create space along an horizontally or vertically.
*
* @param {S[]} movingShapes
* @param {S[]} resizingShapes
* @param {X[]} movingShapes
* @param {X[]} resizingShapes
* @param {Point} delta
* @param {Direction} direction
* @param {number} start
Expand All @@ -633,7 +633,7 @@ Modeling.prototype.createSpace = function(movingShapes, resizingShapes, delta, d
/**
* Update a connetions waypoints.
*
* @param {C} connection
* @param {T} connection
* @param {Point[]} newWaypoints
* @param {ModelingHints} [hints]
*/
Expand All @@ -650,9 +650,9 @@ Modeling.prototype.updateWaypoints = function(connection, newWaypoints, hints) {
/**
* Reconnect a connections source and/or target.
*
* @param {C} connection
* @param {E} source
* @param {E} target
* @param {T} connection
* @param {U} source
* @param {U} target
* @param {Point|Point[]} dockingOrPoints
* @param {ModelingHints} [hints]
*/
Expand All @@ -671,8 +671,8 @@ Modeling.prototype.reconnect = function(connection, source, target, dockingOrPoi
/**
* Reconnect a connections source.
*
* @param {C} connection
* @param {E} newSource
* @param {T} connection
* @param {U} newSource
* @param {Point|Point[]} dockingOrPoints
* @param {ModelingHints} [hints]
*/
Expand All @@ -689,8 +689,8 @@ Modeling.prototype.reconnectStart = function(connection, newSource, dockingOrPoi
/**
* Reconnect a connections target.
*
* @param {C} connection
* @param {E} newTarget
* @param {T} connection
* @param {U} newTarget
* @param {Point|Point[]} dockingOrPoints
* @param {ModelingHints} [hints]
*/
Expand All @@ -707,12 +707,12 @@ Modeling.prototype.reconnectEnd = function(connection, newTarget, dockingOrPoint
/**
* Connect two elements.
*
* @param {E} source
* @param {E} target
* @param {Partial<C>} [attrs]
* @param {U} source
* @param {U} target
* @param {Partial<T>} [attrs]
* @param {ModelingHints} [hints]
*
* @return {C}
* @return {T}
*/
Modeling.prototype.connect = function(source, target, attrs, hints) {
return this.createConnection(source, target, attrs || {}, source.parent, hints);
Expand All @@ -729,7 +729,7 @@ Modeling.prototype._create = function(type, attrs) {
/**
* Collapse or expand a shape.
*
* @param {S} shape
* @param {X} shape
* @param {ModelingHints} [hints]
*/
Modeling.prototype.toggleCollapse = function(shape, hints) {
Expand Down

0 comments on commit 697b2a1

Please sign in to comment.