|
@@ -27,7 +27,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
private _hostCanvas: HTMLDivElement;
|
|
private _hostCanvas: HTMLDivElement;
|
|
private _graphCanvas: HTMLDivElement;
|
|
private _graphCanvas: HTMLDivElement;
|
|
private _selectionContainer: HTMLDivElement;
|
|
private _selectionContainer: HTMLDivElement;
|
|
- private _groupContainer: HTMLDivElement;
|
|
|
|
|
|
+ private _frameContainer: HTMLDivElement;
|
|
private _svgCanvas: HTMLElement;
|
|
private _svgCanvas: HTMLElement;
|
|
private _rootContainer: HTMLDivElement;
|
|
private _rootContainer: HTMLDivElement;
|
|
private _nodes: GraphNode[] = [];
|
|
private _nodes: GraphNode[] = [];
|
|
@@ -139,8 +139,8 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
return this._selectionContainer;
|
|
return this._selectionContainer;
|
|
}
|
|
}
|
|
|
|
|
|
- public get groupContainer() {
|
|
|
|
- return this._groupContainer;
|
|
|
|
|
|
+ public get frameContainer() {
|
|
|
|
+ return this._frameContainer;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -364,7 +364,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
this._graphCanvas = this.props.globalState.hostDocument.getElementById("graph-canvas-container") as HTMLDivElement;
|
|
this._graphCanvas = this.props.globalState.hostDocument.getElementById("graph-canvas-container") as HTMLDivElement;
|
|
this._svgCanvas = this.props.globalState.hostDocument.getElementById("graph-svg-container") as HTMLElement;
|
|
this._svgCanvas = this.props.globalState.hostDocument.getElementById("graph-svg-container") as HTMLElement;
|
|
this._selectionContainer = this.props.globalState.hostDocument.getElementById("selection-container") as HTMLDivElement;
|
|
this._selectionContainer = this.props.globalState.hostDocument.getElementById("selection-container") as HTMLDivElement;
|
|
- this._groupContainer = this.props.globalState.hostDocument.getElementById("group-container") as HTMLDivElement;
|
|
|
|
|
|
+ this._frameContainer = this.props.globalState.hostDocument.getElementById("frame-container") as HTMLDivElement;
|
|
|
|
|
|
this.gridSize = DataStorage.ReadNumber("GridSize", 20);
|
|
this.gridSize = DataStorage.ReadNumber("GridSize", 20);
|
|
this.updateTransform();
|
|
this.updateTransform();
|
|
@@ -399,7 +399,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- // Candidate group box
|
|
|
|
|
|
+ // Candidate frame box
|
|
if (this._frameCandidate) {
|
|
if (this._frameCandidate) {
|
|
const rootRect = this.canvasContainer.getBoundingClientRect();
|
|
const rootRect = this.canvasContainer.getBoundingClientRect();
|
|
|
|
|
|
@@ -495,11 +495,11 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- // Group?
|
|
|
|
|
|
+ // Frame?
|
|
if (evt.currentTarget === this._hostCanvas && evt.shiftKey) {
|
|
if (evt.currentTarget === this._hostCanvas && evt.shiftKey) {
|
|
this._frameCandidate = this.props.globalState.hostDocument.createElement("div");
|
|
this._frameCandidate = this.props.globalState.hostDocument.createElement("div");
|
|
- this._frameCandidate.classList.add("group-box");
|
|
|
|
- this._groupContainer.appendChild(this._frameCandidate);
|
|
|
|
|
|
+ this._frameCandidate.classList.add("frame-box");
|
|
|
|
+ this._frameContainer.appendChild(this._frameCandidate);
|
|
|
|
|
|
const rootRect = this.canvasContainer.getBoundingClientRect();
|
|
const rootRect = this.canvasContainer.getBoundingClientRect();
|
|
this._selectionStartX = (evt.pageX - rootRect.left);
|
|
this._selectionStartX = (evt.pageX - rootRect.left);
|
|
@@ -545,8 +545,8 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
}
|
|
}
|
|
|
|
|
|
if (this._frameCandidate) {
|
|
if (this._frameCandidate) {
|
|
- let newGroup = new GraphFrame(this._frameCandidate, this);
|
|
|
|
- this._frames.push(newGroup);
|
|
|
|
|
|
+ let newFrame = new GraphFrame(this._frameCandidate, this);
|
|
|
|
+ this._frames.push(newFrame);
|
|
|
|
|
|
this._frameCandidate.parentElement!.removeChild(this._frameCandidate);
|
|
this._frameCandidate.parentElement!.removeChild(this._frameCandidate);
|
|
this._frameCandidate = null;
|
|
this._frameCandidate = null;
|
|
@@ -712,7 +712,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
<div id="graph-container">
|
|
<div id="graph-container">
|
|
<div id="graph-canvas-container">
|
|
<div id="graph-canvas-container">
|
|
</div>
|
|
</div>
|
|
- <div id="group-container">
|
|
|
|
|
|
+ <div id="frame-container">
|
|
</div>
|
|
</div>
|
|
<svg id="graph-svg-container">
|
|
<svg id="graph-svg-container">
|
|
</svg>
|
|
</svg>
|