@@ -146,7 +146,7 @@ class HierarchicalLayoutUtil {
146146 private minEdgeJetty : number = 12 ;
147147 //Defines a vertex that is equivalent to a node object
148148 private createVertex ( node : INode , value : string , x : number , y : number , width : number , height : number ) : Vertex {
149- const geometry : Rect = { x : x , y : y , width : width , height : height } ;
149+ const geometry : LayoutRect = { x : x , y : y , width : width , height : height } ;
150150 const vertex : Vertex = {
151151 value : value , geometry : geometry , name : value , vertex : true ,
152152 inEdges : node . inEdges . slice ( ) , outEdges : node . outEdges . slice ( ) ,
@@ -311,9 +311,9 @@ class HierarchicalLayoutUtil {
311311 }
312312
313313 //Returns the bounds of the given vertices
314- private getModelBounds ( nodes : Vertex [ ] ) : Rect {
314+ private getModelBounds ( nodes : Vertex [ ] ) : LayoutRect {
315315 nodes = nodes . slice ( ) ;
316- let rect : Rect = null ; let rect1 : Rect = null ;
316+ let rect : LayoutRect = null ; let rect1 : LayoutRect = null ;
317317 for ( let i : number = 0 ; i < nodes . length ; i ++ ) {
318318 rect = nodes [ parseInt ( i . toString ( ) , 10 ) ] . geometry ;
319319 if ( rect1 ) {
@@ -455,7 +455,7 @@ class HierarchicalLayoutUtil {
455455 }
456456 }
457457 }
458- const modelBounds : Rect = this . getModelBounds ( this . vertices ) ;
458+ const modelBounds : LayoutRect = this . getModelBounds ( this . vertices ) ;
459459 this . updateMargin ( layoutProp , layout , modelBounds , viewPort ) ;
460460 for ( let i : number = 0 ; i < this . vertices . length ; i ++ ) {
461461 const clnode : Vertex = this . vertices [ parseInt ( i . toString ( ) , 10 ) ] ;
@@ -1099,8 +1099,8 @@ class HierarchicalLayoutUtil {
10991099 this . rankBottomY [ parseInt ( i . toString ( ) , 10 ) ] = - Number . MAX_VALUE ;
11001100 }
11011101 }
1102- private setVertexLocationValue ( cell : IVertex , orientation : LayoutOrientation , modelBounds : Rect ) : void {
1103- const cellGeomtry : Rect = cell . cell . geometry ;
1102+ private setVertexLocationValue ( cell : IVertex , orientation : LayoutOrientation , modelBounds : LayoutRect ) : void {
1103+ const cellGeomtry : LayoutRect = cell . cell . geometry ;
11041104 let positionX : number ;
11051105 let positionY : number ;
11061106 if ( orientation === 'TopToBottom' || orientation === 'BottomToTop' ) {
@@ -1122,8 +1122,8 @@ class HierarchicalLayoutUtil {
11221122 }
11231123 }
11241124
1125- private calculateRectValue ( dnode : INode ) : Rect {
1126- const rect : Rect = { x : 0 , y : 0 , right : 0 , bottom : 0 , height : 0 , width : 0 } ;
1125+ private calculateRectValue ( dnode : INode ) : LayoutRect {
1126+ const rect : LayoutRect = { x : 0 , y : 0 , right : 0 , bottom : 0 , height : 0 , width : 0 } ;
11271127 rect . x = dnode . offsetX - dnode . actualSize . width / 2 ;
11281128 rect . right = dnode . offsetX + dnode . actualSize . width / 2 ;
11291129 rect . y = dnode . offsetY - dnode . actualSize . height / 2 ;
@@ -1132,9 +1132,9 @@ class HierarchicalLayoutUtil {
11321132 }
11331133
11341134 private isNodeOverLap ( dnode : INode , layoutProp : Layout ) : void {
1135- let nodeRect : Rect = { x : 0 , y : 0 , right : 0 , bottom : 0 , height : 0 , width : 0 } ;
1135+ let nodeRect : LayoutRect = { x : 0 , y : 0 , right : 0 , bottom : 0 , height : 0 , width : 0 } ;
11361136 for ( let i : number = 0 ; i < this . vertices . length ; i ++ ) {
1137- let rect : Rect = { x : 0 , y : 0 , width : 0 , height : 0 } ;
1137+ let rect : LayoutRect = { x : 0 , y : 0 , width : 0 , height : 0 } ;
11381138 //let tempnode1: INode;
11391139 const tempnode1 : INode = this . nameTable [ this . vertices [ parseInt ( i . toString ( ) , 10 ) ] . value ] ;
11401140 if ( dnode . id !== tempnode1 . id && tempnode1 . offsetX !== 0 && tempnode1 . offsetY !== 0 ) {
@@ -1152,7 +1152,7 @@ class HierarchicalLayoutUtil {
11521152 }
11531153 }
11541154
1155- private isIntersect ( rect : Rect , nodeRect : Rect , layoutProp : Layout ) : boolean {
1155+ private isIntersect ( rect : LayoutRect , nodeRect : LayoutRect , layoutProp : Layout ) : boolean {
11561156 if ( ! ( Math . floor ( rect . right + layoutProp . horizontalSpacing ) <= Math . floor ( nodeRect . x ) ||
11571157 Math . floor ( rect . x - layoutProp . horizontalSpacing ) >= Math . floor ( nodeRect . right )
11581158 || Math . floor ( rect . y - layoutProp . verticalSpacing ) >= Math . floor ( nodeRect . bottom )
@@ -1164,15 +1164,15 @@ class HierarchicalLayoutUtil {
11641164 }
11651165
11661166 /* eslint-disable */
1167- private updateMargin ( layoutProp : Layout , layout : LayoutProp , modelBounds : Rect , viewPort : PointModel ) : void {
1168- const viewPortBounds : Rect = { x : 0 , y : 0 , width : viewPort . x , height : viewPort . y } ;
1167+ private updateMargin ( layoutProp : Layout , layout : LayoutProp , modelBounds : LayoutRect , viewPort : PointModel ) : void {
1168+ const viewPortBounds : LayoutRect = { x : 0 , y : 0 , width : viewPort . x , height : viewPort . y } ;
11691169 //let layoutBounds: Rect;
11701170 let bounds : Bounds = {
11711171 x : modelBounds . x , y : modelBounds . y ,
11721172 right : modelBounds . x + modelBounds . width ,
11731173 bottom : modelBounds . y + modelBounds . height
11741174 } ;
1175- const layoutBounds : Rect = layoutProp . bounds ? layoutProp . bounds : viewPortBounds ;
1175+ const layoutBounds : LayoutRect = layoutProp . bounds ? layoutProp . bounds : viewPortBounds ;
11761176 if ( layout . orientation === 'TopToBottom' || layout . orientation === 'BottomToTop' ) {
11771177 switch ( layoutProp . horizontalAlignment ) {
11781178 case 'Auto' :
@@ -1654,10 +1654,10 @@ class HierarchicalLayoutUtil {
16541654
16551655
16561656 //used to specify the geometrical position of the layout model cell
1657- private garphModelsetVertexLocation ( plalementChange : PlacementStage , cell : Vertex , x : number , y : number ) : Rect {
1657+ private garphModelsetVertexLocation ( plalementChange : PlacementStage , cell : Vertex , x : number , y : number ) : LayoutRect {
16581658 //let model: MultiParentModel = plalementChange.model;
1659- const geometry : Rect = cell . geometry ;
1660- let result : Rect = null ;
1659+ const geometry : LayoutRect = cell . geometry ;
1660+ let result : LayoutRect = null ;
16611661 if ( geometry != null ) {
16621662 result = { x : x , y : y , width : geometry . width , height : geometry . height } ;
16631663 if ( geometry . x !== x || geometry . y !== y ) {
@@ -2705,7 +2705,7 @@ class CrossReduction {
27052705 */
27062706export interface Vertex {
27072707 value : string ;
2708- geometry : Rect ;
2708+ geometry : LayoutRect ;
27092709 name : string ;
27102710 vertex : boolean ;
27112711 inEdges : string [ ] ;
@@ -2854,7 +2854,7 @@ export interface LayoutProp {
28542854 enableLayoutRouting : boolean ;
28552855}
28562856
2857- interface Rect {
2857+ interface LayoutRect {
28582858 x : number ;
28592859 y : number ;
28602860 width : number ;
0 commit comments