mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-11 09:36:07 +00:00
chore(documentation): fix JSDoc string types
This commit is contained in:
parent
3620f38158
commit
7a67ff95b2
@ -12,8 +12,8 @@ import BaseViewer from './BaseViewer';
|
||||
*
|
||||
* @param {Object} [options] configuration options to pass to the viewer
|
||||
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
||||
* @param {String|Number} [options.width] the width of the viewer
|
||||
* @param {String|Number} [options.height] the height of the viewer
|
||||
* @param {string|Number} [options.width] the width of the viewer
|
||||
* @param {string|Number} [options.height] the height of the viewer
|
||||
* @param {Object} [options.moddleExtensions] extension packages to provide
|
||||
* @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
|
||||
* @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
|
||||
|
@ -40,8 +40,8 @@ import {
|
||||
*
|
||||
* @param {Object} [options] configuration options to pass to the viewer
|
||||
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
||||
* @param {String|Number} [options.width] the width of the viewer
|
||||
* @param {String|Number} [options.height] the height of the viewer
|
||||
* @param {string|Number} [options.width] the width of the viewer
|
||||
* @param {string|Number} [options.height] the height of the viewer
|
||||
* @param {Object} [options.moddleExtensions] extension packages to provide
|
||||
* @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
|
||||
* @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
|
||||
@ -84,8 +84,8 @@ inherits(BaseViewer, Diagram);
|
||||
*
|
||||
* You can use these events to hook into the life-cycle.
|
||||
*
|
||||
* @param {String} xml the BPMN 2.0 xml
|
||||
* @param {ModdleElement<BPMNDiagram>|String} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered)
|
||||
* @param {string} xml the BPMN 2.0 xml
|
||||
* @param {ModdleElement<BPMNDiagram>|string} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered)
|
||||
* @param {Function} [done] invoked with (err, warnings=[])
|
||||
*/
|
||||
BaseViewer.prototype.importXML = function(xml, bpmnDiagram, done) {
|
||||
@ -150,7 +150,7 @@ BaseViewer.prototype.importXML = function(xml, bpmnDiagram, done) {
|
||||
* You can use these events to hook into the life-cycle.
|
||||
*
|
||||
* @param {ModdleElement<Definitions>} definitions parsed BPMN 2.0 definitions
|
||||
* @param {ModdleElement<BPMNDiagram>|String} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered)
|
||||
* @param {ModdleElement<BPMNDiagram>|string} [bpmnDiagram] BPMN diagram or id of diagram to render (if not provided, the first one will be rendered)
|
||||
* @param {Function} [done] invoked with (err, warnings=[])
|
||||
*/
|
||||
BaseViewer.prototype.importDefinitions = function(definitions, bpmnDiagram, done) {
|
||||
@ -183,7 +183,7 @@ BaseViewer.prototype.importDefinitions = function(definitions, bpmnDiagram, done
|
||||
*
|
||||
* You can use these events to hook into the life-cycle.
|
||||
*
|
||||
* @param {String|ModdleElement<BPMNDiagram>} [bpmnDiagramOrId] id or the diagram to open
|
||||
* @param {string|ModdleElement<BPMNDiagram>} [bpmnDiagramOrId] id or the diagram to open
|
||||
* @param {Function} [done] invoked with (err, warnings=[])
|
||||
*/
|
||||
BaseViewer.prototype.open = function(bpmnDiagramOrId, done) {
|
||||
@ -350,7 +350,7 @@ BaseViewer.prototype.saveSVG = function(options, done) {
|
||||
* var elementRegistry = viewer.get('elementRegistry');
|
||||
* var startEventShape = elementRegistry.get('StartEvent_1');
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {string} name
|
||||
*
|
||||
* @return {Object} diagram service instance
|
||||
*
|
||||
@ -432,7 +432,7 @@ BaseViewer.prototype.destroy = function() {
|
||||
*
|
||||
* Remove a previously added listener via {@link #off(event, callback)}.
|
||||
*
|
||||
* @param {String} event
|
||||
* @param {string} event
|
||||
* @param {Number} [priority]
|
||||
* @param {Function} callback
|
||||
* @param {Object} [that]
|
||||
@ -444,7 +444,7 @@ BaseViewer.prototype.on = function(event, priority, callback, target) {
|
||||
/**
|
||||
* De-register an event listener
|
||||
*
|
||||
* @param {String} event
|
||||
* @param {string} event
|
||||
* @param {Function} callback
|
||||
*/
|
||||
BaseViewer.prototype.off = function(event, callback) {
|
||||
@ -524,7 +524,7 @@ BaseViewer.prototype._init = function(container, moddle, options) {
|
||||
/**
|
||||
* Emit an event on the underlying {@link EventBus}
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {string} type
|
||||
* @param {Object} event
|
||||
*
|
||||
* @return {Object} event processing result (if any)
|
||||
@ -593,7 +593,7 @@ function ensureUnit(val) {
|
||||
* Find BPMNDiagram in definitions by ID
|
||||
*
|
||||
* @param {ModdleElement<Definitions>} definitions
|
||||
* @param {String} diagramId
|
||||
* @param {string} diagramId
|
||||
*
|
||||
* @return {ModdleElement<BPMNDiagram>|null}
|
||||
*/
|
||||
|
@ -123,8 +123,8 @@ var initialDiagram =
|
||||
*
|
||||
* @param {Object} [options] configuration options to pass to the viewer
|
||||
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
||||
* @param {String|Number} [options.width] the width of the viewer
|
||||
* @param {String|Number} [options.height] the height of the viewer
|
||||
* @param {string|Number} [options.width] the width of the viewer
|
||||
* @param {string|Number} [options.height] the height of the viewer
|
||||
* @param {Object} [options.moddleExtensions] extension packages to provide
|
||||
* @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
|
||||
* @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
|
||||
|
@ -49,8 +49,8 @@ import BaseViewer from './BaseViewer';
|
||||
*
|
||||
* @param {Object} [options] configuration options to pass to the viewer
|
||||
* @param {DOMElement} [options.container] the container to render the viewer in, defaults to body.
|
||||
* @param {String|Number} [options.width] the width of the viewer
|
||||
* @param {String|Number} [options.height] the height of the viewer
|
||||
* @param {string|Number} [options.width] the width of the viewer
|
||||
* @param {string|Number} [options.height] the height of the viewer
|
||||
* @param {Object} [options.moddleExtensions] extension packages to provide
|
||||
* @param {Array<didi.Module>} [options.modules] a list of modules to override the default modules
|
||||
* @param {Array<didi.Module>} [options.additionalModules] a list of modules to use with the default modules
|
||||
|
@ -362,7 +362,7 @@ export default function PathMap() {
|
||||
* Also there are use cases where only some parts of a path should be
|
||||
* scaled.</p>
|
||||
*
|
||||
* @param {String} pathId The ID of the path.
|
||||
* @param {string} pathId The ID of the path.
|
||||
* @param {Object} param <p>
|
||||
* Example param object scales the path to 60% size of the container (data.width, data.height).
|
||||
* <pre>
|
||||
|
@ -32,7 +32,7 @@ export default function TextRenderer(config) {
|
||||
* layouted label.
|
||||
*
|
||||
* @param {Bounds} bounds
|
||||
* @param {String} text
|
||||
* @param {string} text
|
||||
*
|
||||
* @return {Bounds}
|
||||
*/
|
||||
@ -62,7 +62,7 @@ export default function TextRenderer(config) {
|
||||
* Get the new bounds of text annotation.
|
||||
*
|
||||
* @param {Bounds} bounds
|
||||
* @param {String} text
|
||||
* @param {string} text
|
||||
*
|
||||
* @return {Bounds}
|
||||
*/
|
||||
@ -86,7 +86,7 @@ export default function TextRenderer(config) {
|
||||
/**
|
||||
* Create a layouted text element.
|
||||
*
|
||||
* @param {String} text
|
||||
* @param {string} text
|
||||
* @param {Object} [options]
|
||||
*
|
||||
* @return {SVGElement} rendered text
|
||||
|
@ -142,9 +142,9 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
|
||||
/**
|
||||
* Create an append action
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {String} className
|
||||
* @param {String} [title]
|
||||
* @param {string} type
|
||||
* @param {string} className
|
||||
* @param {string} [title]
|
||||
* @param {Object} [options]
|
||||
*
|
||||
* @return {Object} descriptor
|
||||
|
@ -34,7 +34,7 @@ BpmnKeyboardBindings.prototype.registerBindings = function(keyboard, editorActio
|
||||
* Add keyboard binding if respective editor action
|
||||
* is registered.
|
||||
*
|
||||
* @param {String} action name
|
||||
* @param {string} action name
|
||||
* @param {Function} fn that implements the key binding
|
||||
*/
|
||||
function addListener(action, fn) {
|
||||
|
@ -31,7 +31,7 @@ export default function UpdateLabelHandler(modeling, textRenderer) {
|
||||
* Element parameter can be label itself or connection (i.e. sequence flow).
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
* @param {String} text
|
||||
* @param {string} text
|
||||
*/
|
||||
function setText(element, text) {
|
||||
|
||||
|
@ -229,7 +229,7 @@ ElementFactory.prototype.createParticipantShape = function(attrs) {
|
||||
*
|
||||
* @param {Base} element
|
||||
* @param {Object} attrs (in/out map of attributes)
|
||||
* @param {Array<String>} attributeNames name of attributes to apply
|
||||
* @param {Array<string>} attributeNames name of attributes to apply
|
||||
*/
|
||||
function applyAttributes(element, attrs, attributeNames) {
|
||||
|
||||
@ -246,7 +246,7 @@ function applyAttributes(element, attrs, attributeNames) {
|
||||
*
|
||||
* @param {Base} element
|
||||
* @param {Object} attrs (in/out map of attributes)
|
||||
* @param {String} attributeName to apply
|
||||
* @param {string} attributeName to apply
|
||||
*/
|
||||
function applyAttribute(element, attrs, attributeName) {
|
||||
element[attributeName] = attrs[attributeName];
|
||||
|
@ -173,7 +173,7 @@ AdaptiveLabelPositioningBehavior.$inject = [
|
||||
*
|
||||
* @param {Shape} element
|
||||
*
|
||||
* @return {Array<String>}
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
function getTakenHostAlignments(element) {
|
||||
|
||||
@ -204,7 +204,7 @@ function getTakenHostAlignments(element) {
|
||||
*
|
||||
* @param {Shape} element
|
||||
*
|
||||
* @return {Array<String>}
|
||||
* @return {Array<string>}
|
||||
*/
|
||||
function getTakenConnectionAlignments(element) {
|
||||
|
||||
@ -230,7 +230,7 @@ function getTakenConnectionAlignments(element) {
|
||||
*
|
||||
* @param {Shape} element
|
||||
*
|
||||
* @return {String} positioning identifier
|
||||
* @return {string} positioning identifier
|
||||
*/
|
||||
function getOptimalPosition(element) {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { is } from '../../../util/ModelUtil';
|
||||
* Return true if element has any of the given types.
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
* @param {Array<String>} types
|
||||
* @param {Array<string>} types
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
@ -24,7 +24,7 @@ export function isAny(element, types) {
|
||||
* Return the parent of the element with any of the given types.
|
||||
*
|
||||
* @param {djs.model.Base} element
|
||||
* @param {String|Array<String>} anyType
|
||||
* @param {string|Array<string>} anyType
|
||||
*
|
||||
* @return {djs.model.Base}
|
||||
*/
|
||||
|
@ -39,10 +39,10 @@ BpmnSearchProvider.$inject = [
|
||||
*
|
||||
* <Token> :
|
||||
* {
|
||||
* normal|matched: <String>
|
||||
* normal|matched: <string>
|
||||
* }
|
||||
*
|
||||
* @param {String} pattern
|
||||
* @param {string} pattern
|
||||
* @return {Array<Result>}
|
||||
*/
|
||||
BpmnSearchProvider.prototype.find = function(pattern) {
|
||||
|
@ -19,7 +19,7 @@ var diRefs = new Refs(
|
||||
* Returns true if an element has the given meta-model type
|
||||
*
|
||||
* @param {ModdleElement} element
|
||||
* @param {String} type
|
||||
* @param {string} type
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Is an element of the given BPMN type?
|
||||
*
|
||||
* @param {djs.model.Base|ModdleElement} element
|
||||
* @param {String} type
|
||||
* @param {string} type
|
||||
*
|
||||
* @return {Boolean}
|
||||
*/
|
||||
|
@ -142,7 +142,7 @@ export function bootstrapBpmnJS(BpmnJS, diagram, options, locals) {
|
||||
*
|
||||
* });
|
||||
*
|
||||
* @param {String} xml document to display
|
||||
* @param {string} xml document to display
|
||||
* @param {Object} (options) optional options to be passed to the diagram upon instantiation
|
||||
* @param {Object|Function} locals the local overrides to be used by the diagram or a function that produces them
|
||||
* @return {Function} a function to be passed to beforeEach
|
||||
@ -170,7 +170,7 @@ export function bootstrapModeler(diagram, options, locals) {
|
||||
*
|
||||
* });
|
||||
*
|
||||
* @param {String} xml document to display
|
||||
* @param {string} xml document to display
|
||||
* @param {Object} (options) optional options to be passed to the diagram upon instantiation
|
||||
* @param {Object|Function} locals the local overrides to be used by the diagram or a function that produces them
|
||||
* @return {Function} a function to be passed to beforeEach
|
||||
|
@ -61,7 +61,7 @@ CustomElementFactory.$inject = [ 'injector' ];
|
||||
* return shapes[type];
|
||||
*
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {string} type
|
||||
*
|
||||
* @return {Bounds} { width, height}
|
||||
*/
|
||||
|
@ -416,8 +416,8 @@ describe('draw - bpmn renderer', function() {
|
||||
*
|
||||
* @param {djs.model.base} element - Element.
|
||||
* @param {SVG} gfx - Graphics of element.
|
||||
* @param {String} fillColor - Fill color to expect.
|
||||
* @param {String} strokeColor - Stroke color to expect.
|
||||
* @param {string} fillColor - Fill color to expect.
|
||||
* @param {string} strokeColor - Stroke color to expect.
|
||||
*/
|
||||
function expectColors(element, gfx, fillColor, strokeColor) {
|
||||
var djsVisual = domQuery('.djs-visual', gfx);
|
||||
|
@ -834,7 +834,7 @@ describe('features/copy-paste', function() {
|
||||
/**
|
||||
* Integration test involving copying, pasting, moving, undoing and redoing.
|
||||
*
|
||||
* @param {String|Array<String>} elementIds
|
||||
* @param {string|Array<string>} elementIds
|
||||
*/
|
||||
function integrationTest(elementIds) {
|
||||
if (!isArray(elementIds)) {
|
||||
@ -1000,7 +1000,7 @@ function _findDescriptorsInTree(elements, tree, depth) {
|
||||
/**
|
||||
* Copy elements.
|
||||
*
|
||||
* @param {Array<String|djs.model.Base} elements
|
||||
* @param {Array<string|djs.model.Base} elements
|
||||
*
|
||||
* @returns {Object}
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
/**
|
||||
* Create a fake key event for testing purposes.
|
||||
*
|
||||
* @param {String|Number} key the key or keyCode/charCode
|
||||
* @param {string|Number} key the key or keyCode/charCode
|
||||
* @param {Object} [attrs]
|
||||
*
|
||||
* @return {Event}
|
||||
|
Loading…
x
Reference in New Issue
Block a user