Skip to content
This repository was archived by the owner on Dec 16, 2020. It is now read-only.

Commit 6022b34

Browse files
committed
feat: update model module
- fix: move mxCell to model folder - add .editorconfig - add tsconfig.json
1 parent cf9bbf4 commit 6022b34

10 files changed

+824
-811
lines changed

.editorconfig

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/// <reference path="../../../model/mxCell.d.ts" />
2+
3+
/**
4+
* An abstraction of an internal hierarchy node or edge
5+
* @class mxGraphAbstractHierarchyCell
6+
*/
7+
declare class mxGraphAbstractHierarchyCell {
8+
/**
9+
* The maximum rank this cell occupies. Default is -1.
10+
*/
11+
maxRank: number;
12+
13+
/**
14+
* The minimum rank this cell occupies. Default is -1.
15+
*/
16+
minRank: number;
17+
18+
/**
19+
* The x position of this cell for each layer it occupies
20+
*/
21+
x: Array<number>;
22+
23+
/**
24+
* The y position of this cell for each layer it occupies
25+
*/
26+
y: Array<number>;
27+
28+
/**
29+
* The width of this cell. Default is 0.
30+
*/
31+
width: number;
32+
33+
/**
34+
* The height of this cell. Default is 0.
35+
*/
36+
height: number;
37+
38+
/**
39+
* A cached version of the cells this cell connects to on the next layer up
40+
*/
41+
nextLayerConnectedCells: Array<mxCell>;
42+
43+
/**
44+
* A cached version of the cells this cell connects to on the next layer down
45+
*/
46+
previousLayerConnectedCells: Array<mxCell>;
47+
48+
/**
49+
* Temporary variable for general use. Generally, try to avoid
50+
* carrying information between stages. Currently, the longest
51+
* path layering sets temp to the rank position in fixRanks()
52+
* and the crossing reduction uses this. This meant temp couldn't
53+
* be used for hashing the nodes in the model dfs and so hashCode
54+
* was created
55+
*/
56+
temp: any;
57+
58+
/**
59+
* Returns the cells this cell connects to on the next layer up
60+
*/
61+
getNextLayerConnectedCells(layer: any): Array<mxCell>;
62+
63+
/**
64+
* Returns the cells this cell connects to on the next layer down
65+
*/
66+
getPreviousLayerConnectedCells(layer: any): Array<mxCell>;
67+
68+
/**
69+
* Returns whether or not this cell is an edge
70+
*/
71+
isEdge(): boolean;
72+
73+
/**
74+
* Returns whether or not this cell is a node
75+
*/
76+
isVertex(): boolean;
77+
78+
/**
79+
* Gets the value of temp for the specified layer
80+
*/
81+
getGeneralPurposeVariable(layer: any): any;
82+
83+
/**
84+
* Set the value of temp for the specified layer
85+
*/
86+
setGeneralPurposeVariable(layer: number, value: any): any;
87+
88+
/**
89+
* Set the value of x for the specified layer
90+
*/
91+
setX(layer: number, value: number): void;
92+
93+
/**
94+
* Gets the value of x on the specified layer
95+
*/
96+
getX(layer: number): number;
97+
98+
/**
99+
* Set the value of y for the specified layer
100+
*/
101+
setY(layer: number, value: number): void;
102+
103+
}

model/index.d.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
/// <reference path="./mxGeometry.d.ts" />
2-
/// <reference path="./mxGraphModel.d.ts" />
1+
/// <reference path="mxCell.d.ts" />
2+
/// <reference path="mxCellPath.d.ts" />
3+
/// <reference path="mxGeometry.d.ts" />
4+
/// <reference path="mxGraphModel.d.ts" />

0 commit comments

Comments
 (0)