Fix compilation

This commit is contained in:
Paulo Gustavo Veiga 2022-02-11 23:11:59 -08:00
parent 1367321ea5
commit f0c4c46a5d
4 changed files with 10 additions and 6 deletions

View File

@ -38,7 +38,7 @@ class Relationship extends ConnectionLine {
private _endArrow: Arrow;
private _controlPointControllerListener: any;
private _controlPointControllerListener;
private _showStartArrow: Arrow;

View File

@ -1058,7 +1058,7 @@ abstract class Topic extends NodeGraph {
}
}
setSize(size: SizeType, force: boolean): void {
setSize(size: SizeType, force?: boolean): void {
$assert(size, 'size can not be null');
$assert($defined(size.width), 'size seem not to be a valid element');
const roundedSize = {

View File

@ -20,6 +20,7 @@ import Command from '../Command';
import CommandContext from '../CommandContext';
import NodeModel from '../model/NodeModel';
import RelationshipModel from '../model/RelationshipModel';
import Relationship from '../Relationship';
import Topic from '../Topic';
class DeleteCommand extends Command {
@ -159,13 +160,16 @@ class DeleteCommand extends Command {
return result;
}
_collectInDepthRelationships(topic: Topic) {
private _collectInDepthRelationships(topic: Topic): Relationship[] {
let result = [];
result = result.concat(topic.getRelationships());
const children = topic.getChildren();
const rels = children.map(((t) => this._collectInDepthRelationships(t)));
result = result.concat(rels.flat());
const rels: (Relationship[])[] = children
.map(((t: Topic) => this._collectInDepthRelationships(t)));
// flatten and concact
result = result.concat(([].concat(...rels)));
if (result.length > 0) {
// Filter for unique ...

View File

@ -5,7 +5,7 @@
"noImplicitAny": false,
"module": "amd",
"moduleResolution": "node",
"target": "es6",
"target": "ES2020",
"allowJs": true,
"esModuleInterop": true,
"declaration": true,