Skip to content

Commit

Permalink
#9 clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelpiano committed Oct 28, 2022
1 parent 618d7ac commit a534290
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/react-diagrams/MetaNodeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { MetaPort } from '../models/MetaPort';
import { PortTypes, ReactDiagramMetaTypes, CallbackTypes } from '../constants';
import { DefaultPortModel, NodeModel } from '@projectstorm/react-diagrams';
import { BoundingBox } from "../models/BoundingBox";
import { Point } from "@projectstorm/geometry";

export class MetaNodeModel extends NodeModel {
private boundingBox: BoundingBox;
Expand Down Expand Up @@ -97,7 +96,7 @@ export class MetaNodeModel extends NodeModel {
this.setOption('localPosition', this.calculateLocalPosition(parent))
}

setContainerBoundingBox(containerBoundingBox: {left: number, top: number, right: number, bottom: number}): void {
setNodeBoundingBox(containerBoundingBox: {left: number, top: number, right: number, bottom: number}): void {
this.boundingBox = new BoundingBox(
containerBoundingBox.left,
containerBoundingBox.top,
Expand All @@ -114,14 +113,4 @@ export class MetaNodeModel extends NodeModel {
getNodeBoundingBox(): BoundingBox {
return this.boundingBox;
}

setChildPosition(x: number | Point, y?: number): void {
if (x instanceof Point) {
this.position = x;
} else {
// @ts-ignore
this.position = new Point(x, y);
}
this.flagUpdate(CallbackTypes.POSITION_CHANGED, CallbackTypes.CHILD_POSITION_CHANGED)
}
}

0 comments on commit a534290

Please sign in to comment.