@@ -26,7 +26,7 @@ import { FloatingWindowTab } from "./FloatingWindowTab";
26
26
import { TabFloating } from "./TabFloating" ;
27
27
import { IJsonTabNode } from "../model/IJsonModel" ;
28
28
import { Orientation } from "../Orientation" ;
29
- import { CloseIcon , MaximizeIcon , OverflowIcon , PopoutIcon , RestoreIcon } from "./Icons" ;
29
+ import { CloseIcon , EdgeIcon , MaximizeIcon , OverflowIcon , PopoutIcon , RestoreIcon } from "./Icons" ;
30
30
import { TabButtonStamp } from "./TabButtonStamp" ;
31
31
32
32
export type CustomDragCallback = ( dragging : TabNode | IJsonTabNode , over : TabNode , x : number , y : number , location : DockLocation ) => void ;
@@ -136,6 +136,7 @@ export interface IIcons {
136
136
maximize ?: ( React . ReactNode | ( ( tabSetNode : TabSetNode ) => React . ReactNode ) ) ;
137
137
restore ?: ( React . ReactNode | ( ( tabSetNode : TabSetNode ) => React . ReactNode ) ) ;
138
138
more ?: ( React . ReactNode | ( ( tabSetNode : ( TabSetNode | BorderNode ) , hiddenTabs : { node : TabNode ; index : number } [ ] ) => React . ReactNode ) ) ;
139
+ edgeArrow ?: React . ReactNode ;
139
140
}
140
141
141
142
const defaultIcons = {
@@ -145,6 +146,7 @@ const defaultIcons = {
145
146
maximize : < MaximizeIcon /> ,
146
147
restore : < RestoreIcon /> ,
147
148
more : < OverflowIcon /> ,
149
+ edgeArrow : < EdgeIcon />
148
150
} ;
149
151
150
152
export interface ICustomDropDestination {
@@ -519,17 +521,34 @@ export class Layout extends React.Component<ILayoutProps, ILayoutState> {
519
521
}
520
522
521
523
const edges : React . ReactNode [ ] = [ ] ;
524
+ const arrowIcon = this . icons . edgeArrow ;
522
525
if ( this . state . showEdges ) {
523
526
const r = this . centerRect ;
524
527
const length = this . edgeRectLength ;
525
528
const width = this . edgeRectWidth ;
526
529
const offset = this . edgeRectLength / 2 ;
527
530
const className = this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT ) ;
528
531
const radius = 50 ;
529
- edges . push ( < div key = "North" style = { { top : r . y , left : r . x + r . width / 2 - offset , width : length , height : width , borderBottomLeftRadius : radius , borderBottomRightRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_TOP ) } > </ div > ) ;
530
- edges . push ( < div key = "West" style = { { top : r . y + r . height / 2 - offset , left : r . x , width : width , height : length , borderTopRightRadius : radius , borderBottomRightRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_LEFT ) } > </ div > ) ;
531
- edges . push ( < div key = "South" style = { { top : r . y + r . height - width , left : r . x + r . width / 2 - offset , width : length , height : width , borderTopLeftRadius : radius , borderTopRightRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_BOTTOM ) } > </ div > ) ;
532
- edges . push ( < div key = "East" style = { { top : r . y + r . height / 2 - offset , left : r . x + r . width - width , width : width , height : length , borderTopLeftRadius : radius , borderBottomLeftRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_RIGHT ) } > </ div > ) ;
532
+ edges . push ( < div key = "North" style = { { top : r . y , left : r . x + r . width / 2 - offset , width : length , height : width , borderBottomLeftRadius : radius , borderBottomRightRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_TOP ) } >
533
+ < div style = { { transform : "rotate(180deg)" } } >
534
+ { arrowIcon }
535
+ </ div >
536
+ </ div > ) ;
537
+ edges . push ( < div key = "West" style = { { top : r . y + r . height / 2 - offset , left : r . x , width : width , height : length , borderTopRightRadius : radius , borderBottomRightRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_LEFT ) } >
538
+ < div style = { { transform : "rotate(90deg)" } } >
539
+ { arrowIcon }
540
+ </ div >
541
+ </ div > ) ;
542
+ edges . push ( < div key = "South" style = { { top : r . y + r . height - width , left : r . x + r . width / 2 - offset , width : length , height : width , borderTopLeftRadius : radius , borderTopRightRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_BOTTOM ) } >
543
+ < div >
544
+ { arrowIcon }
545
+ </ div >
546
+ </ div > ) ;
547
+ edges . push ( < div key = "East" style = { { top : r . y + r . height / 2 - offset , left : r . x + r . width - width , width : width , height : length , borderTopLeftRadius : radius , borderBottomLeftRadius : radius } } className = { className + " " + this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT_RIGHT ) } >
548
+ < div style = { { transform : "rotate(-90deg)" } } >
549
+ { arrowIcon }
550
+ </ div >
551
+ </ div > ) ;
533
552
}
534
553
535
554
// this.layoutTime = (Date.now() - this.start);
0 commit comments