mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-26 04:32:44 +08:00
fix: fix remaining JSDoc and TS errors
This commit is contained in:
@ -3,7 +3,7 @@ import { getAnchorPointAdjustment } from './LayoutUtil';
|
||||
/**
|
||||
* @typedef {import('diagram-js/lib/util/Types').Point} Point
|
||||
*
|
||||
* @typedef {import('./LayoutUtil').FindNewLintStartIndexHints} FindNewLintStartIndexHints
|
||||
* @typedef {import('./LayoutUtil').FindNewLineStartIndexHints} FindNewLineStartIndexHints
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -12,7 +12,7 @@ import { getAnchorPointAdjustment } from './LayoutUtil';
|
||||
* @param {Point} position
|
||||
* @param {Point[]} newWaypoints
|
||||
* @param {Point[]} oldWaypoints
|
||||
* @param {FindNewLintStartIndexHints} hints
|
||||
* @param {FindNewLineStartIndexHints} hints
|
||||
*
|
||||
* @return {Point}
|
||||
*/
|
||||
|
@ -5,14 +5,18 @@ import { getMid } from 'diagram-js/lib/layout/LayoutUtil';
|
||||
/**
|
||||
* @typedef {import('./LineAttachmentUtil').Attachment} Attachment
|
||||
*
|
||||
* @typedef {import('./LayoutUtil').FindNewLintStartIndexHints} FindNewLintStartIndexHints
|
||||
* @typedef {import('./LayoutUtil').FindNewLineStartIndexHints} FindNewLineStartIndexHints
|
||||
*
|
||||
* @typedef {import('../../../../model/Types').BpmnLabel} BpmnLabel
|
||||
*
|
||||
* @typedef {import('diagram-js/lib/util/Types').Point} Point
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Point[]} oldWaypoints
|
||||
* @param {Point[]} newWaypoints
|
||||
* @param {Attachment} attachment
|
||||
* @param {FindNewLintStartIndexHints} hints
|
||||
* @param {FindNewLineStartIndexHints} hints
|
||||
*
|
||||
* @return {number}
|
||||
*/
|
||||
@ -27,7 +31,7 @@ export function findNewLabelLineStartIndex(oldWaypoints, newWaypoints, attachmen
|
||||
* @param {BpmnLabel} label
|
||||
* @param {Point[]} newWaypoints
|
||||
* @param {Point[]} oldWaypoints
|
||||
* @param {FindNewLintStartIndexHints} hints
|
||||
* @param {FindNewLineStartIndexHints} hints
|
||||
*
|
||||
* @return {Point}
|
||||
*/
|
||||
|
@ -22,7 +22,7 @@ import {
|
||||
* delta: Point;
|
||||
* } } AnchorPointAdjustment
|
||||
*
|
||||
* @param { {
|
||||
* @typedef { {
|
||||
* segmentMove?: {
|
||||
* segmentStartIndex: number;
|
||||
* newSegmentStartIndex: number;
|
||||
@ -33,14 +33,14 @@ import {
|
||||
* };
|
||||
* connectionStart: boolean;
|
||||
* connectionEnd: boolean;
|
||||
* } } FindNewLintStartIndexHints
|
||||
* } } FindNewLineStartIndexHints
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Point[]} oldWaypoints
|
||||
* @param {Point[]} newWaypoints
|
||||
* @param {Attachment} attachment
|
||||
* @param {FindNewLintStartIndexHints} hints
|
||||
* @param {FindNewLineStartIndexHints} hints
|
||||
*
|
||||
* @return {number}
|
||||
*/
|
||||
@ -131,7 +131,7 @@ export function findNewLineStartIndex(oldWaypoints, newWaypoints, attachment, hi
|
||||
* @param {Point} position
|
||||
* @param {Point[]} newWaypoints
|
||||
* @param {Point[]} oldWaypoints
|
||||
* @param {FindNewLintStartIndexHints} hints
|
||||
* @param {FindNewLineStartIndexHints} hints
|
||||
*
|
||||
* @return {AnchorPointAdjustment} result
|
||||
*/
|
||||
|
@ -1,20 +1,20 @@
|
||||
/**
|
||||
* @typedef {import('diagram-js/lib/util/Types').Point} Point
|
||||
*
|
||||
* @typedef { {
|
||||
* type: 'bendpoint' | 'segment';
|
||||
* position: Point;
|
||||
* segmentIndex: number;
|
||||
* bendpointIndex?: number;
|
||||
* relativeLocation?: number;
|
||||
* } } Attachment
|
||||
*/
|
||||
|
||||
var sqrt = Math.sqrt,
|
||||
min = Math.min,
|
||||
max = Math.max,
|
||||
abs = Math.abs;
|
||||
|
||||
/**
|
||||
* @typedef {import('../../../../util/Types').Point} Point
|
||||
*
|
||||
* @typedef { {
|
||||
* type: 'bendpoint' | 'segment';
|
||||
* position: Point;
|
||||
* segmentIndex: number;
|
||||
* bendpointIndex?: number;
|
||||
* relativeLocation?: number;
|
||||
* } } Attachment
|
||||
*/
|
||||
|
||||
/**
|
||||
* Calculate the square (power to two) of a number.
|
||||
*
|
||||
|
@ -1,3 +1,7 @@
|
||||
/**
|
||||
* @typedef {import('diagram-js/lib/util/Types').Point} Point
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns the intersection between two line segments a and b.
|
||||
*
|
||||
|
@ -61,6 +61,7 @@ UpdateCanvasRootHandler.prototype.execute = function(context) {
|
||||
|
||||
// TODO(nikku): return changed elements?
|
||||
// return [ newRoot, oldRoot ];
|
||||
return [];
|
||||
};
|
||||
|
||||
|
||||
@ -94,4 +95,6 @@ UpdateCanvasRootHandler.prototype.revert = function(context) {
|
||||
|
||||
// TODO(nikku): return changed elements?
|
||||
// return [ newRoot, oldRoot ];
|
||||
|
||||
return [];
|
||||
};
|
@ -184,6 +184,8 @@ UpdateFlowNodeRefsHandler.prototype.execute = function(context) {
|
||||
|
||||
// TODO(nikku): return changed elements
|
||||
// return [ ... ];
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
|
||||
@ -211,4 +213,6 @@ UpdateFlowNodeRefsHandler.prototype.revert = function(context) {
|
||||
|
||||
// TODO(nikku): return changed elements
|
||||
// return [ ... ];
|
||||
|
||||
return [];
|
||||
};
|
||||
|
@ -30,6 +30,8 @@ UpdateSemanticParentHandler.prototype.execute = function(context) {
|
||||
|
||||
// update DI parent
|
||||
this._bpmnUpdater.updateDiParent(dataStoreDi, newDiParent);
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
UpdateSemanticParentHandler.prototype.revert = function(context) {
|
||||
@ -43,5 +45,7 @@ UpdateSemanticParentHandler.prototype.revert = function(context) {
|
||||
|
||||
// update DI parent
|
||||
this._bpmnUpdater.updateDiParent(dataStoreDi, oldDiParent);
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user