@@ -26,7 +26,7 @@ import { FloatingWindowTab } from "./FloatingWindowTab";
2626import { TabFloating } from "./TabFloating" ;
2727import { IJsonTabNode } from "../model/IJsonModel" ;
2828import { Orientation } from "../Orientation" ;
29- import { CloseIcon , MaximizeIcon , OverflowIcon , PopoutIcon , RestoreIcon } from "./Icons" ;
29+ import { CloseIcon , EdgeIcon , MaximizeIcon , OverflowIcon , PopoutIcon , RestoreIcon } from "./Icons" ;
3030import { TabButtonStamp } from "./TabButtonStamp" ;
3131
3232export type CustomDragCallback = ( dragging : TabNode | IJsonTabNode , over : TabNode , x : number , y : number , location : DockLocation ) => void ;
@@ -136,6 +136,7 @@ export interface IIcons {
136136 maximize ?: ( React . ReactNode | ( ( tabSetNode : TabSetNode ) => React . ReactNode ) ) ;
137137 restore ?: ( React . ReactNode | ( ( tabSetNode : TabSetNode ) => React . ReactNode ) ) ;
138138 more ?: ( React . ReactNode | ( ( tabSetNode : ( TabSetNode | BorderNode ) , hiddenTabs : { node : TabNode ; index : number } [ ] ) => React . ReactNode ) ) ;
139+ edgeArrow ?: React . ReactNode ;
139140}
140141
141142const defaultIcons = {
@@ -145,6 +146,7 @@ const defaultIcons = {
145146 maximize : < MaximizeIcon /> ,
146147 restore : < RestoreIcon /> ,
147148 more : < OverflowIcon /> ,
149+ edgeArrow : < EdgeIcon />
148150} ;
149151
150152export interface ICustomDropDestination {
@@ -519,17 +521,34 @@ export class Layout extends React.Component<ILayoutProps, ILayoutState> {
519521 }
520522
521523 const edges : React . ReactNode [ ] = [ ] ;
524+ const arrowIcon = this . icons . edgeArrow ;
522525 if ( this . state . showEdges ) {
523526 const r = this . centerRect ;
524527 const length = this . edgeRectLength ;
525528 const width = this . edgeRectWidth ;
526529 const offset = this . edgeRectLength / 2 ;
527530 const className = this . getClassName ( CLASSES . FLEXLAYOUT__EDGE_RECT ) ;
528531 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 > ) ;
533552 }
534553
535554 // this.layoutTime = (Date.now() - this.start);
0 commit comments