@@ -61,18 +61,22 @@ export class Row extends ChildProperty<Row> {
61
61
public nearSizes : number [ ] = [ ] ;
62
62
/** @private */
63
63
public farSizes : number [ ] = [ ] ;
64
+ /** @private */
65
+ public insideFarSizes : number [ ] = [ ] ;
66
+ /** @private */
67
+ public insideNearSizes : number [ ] = [ ] ;
64
68
/**
65
69
* Measure the row size
66
70
*
67
71
* @returns {void }
68
72
* @private
69
73
*/
70
- public computeSize ( axis : Axis , scrollBarHeight : number ) : void {
74
+ public computeSize ( axis : Axis , scrollBarHeight : number , definition : Row | Column ) : void {
71
75
let width : number = 0 ;
72
76
const innerPadding : number = 5 ;
73
77
if ( axis . visible && axis . internalVisibility ) {
74
78
width += ( axis . findTickSize ( axis . crossInAxis ) + scrollBarHeight +
75
- axis . findLabelSize ( axis . crossInAxis , innerPadding ) + axis . lineStyle . width * 0.5 ) ;
79
+ axis . findLabelSize ( axis . crossInAxis , innerPadding , definition ) + axis . lineStyle . width * 0.5 ) ;
76
80
}
77
81
78
82
if ( axis . isAxisOpposedPosition ) {
@@ -116,6 +120,10 @@ export class Column extends ChildProperty<Column> {
116
120
/** @private */
117
121
public farSizes : number [ ] = [ ] ;
118
122
/** @private */
123
+ public insideFarSizes : number [ ] = [ ] ;
124
+ /** @private */
125
+ public insideNearSizes : number [ ] = [ ] ;
126
+ /** @private */
119
127
private padding : number = 0 ;
120
128
121
129
/**
@@ -125,12 +133,12 @@ export class Column extends ChildProperty<Column> {
125
133
* @private
126
134
*/
127
135
128
- public computeSize ( axis : Axis , scrollBarHeight : number ) : void {
136
+ public computeSize ( axis : Axis , scrollBarHeight : number , definition : Row | Column ) : void {
129
137
let height : number = 0 ;
130
138
const innerPadding : number = 5 ;
131
139
if ( axis . visible && axis . internalVisibility ) {
132
140
height += ( axis . findTickSize ( axis . crossInAxis ) + scrollBarHeight +
133
- axis . findLabelSize ( axis . crossInAxis , innerPadding ) + axis . lineStyle . width * 0.5 ) ;
141
+ axis . findLabelSize ( axis . crossInAxis , innerPadding , definition ) + axis . lineStyle . width * 0.5 ) ;
134
142
}
135
143
if ( axis . isAxisOpposedPosition ) {
136
144
this . farSizes . push ( height ) ;
@@ -1045,7 +1053,7 @@ export class Axis extends ChildProperty<Axis> {
1045
1053
* @returns {number } labelSize
1046
1054
* @private
1047
1055
*/
1048
- public findLabelSize ( crossAxis : Axis , innerPadding : number ) : number {
1056
+ public findLabelSize ( crossAxis : Axis , innerPadding : number , definition : Row | Column ) : number {
1049
1057
let titleSize : number = 0 ; const isHorizontal : boolean = this . orientation === 'Horizontal' ;
1050
1058
if ( this . title ) {
1051
1059
this . titleSize = measureText ( this . title , this . titleStyle ) ;
@@ -1056,9 +1064,6 @@ export class Axis extends ChildProperty<Axis> {
1056
1064
titleSize = ( titleSize * this . titleCollection . length ) ;
1057
1065
}
1058
1066
}
1059
- if ( this . labelPosition === 'Inside' ) {
1060
- return titleSize + innerPadding ;
1061
- }
1062
1067
let diff : number ;
1063
1068
let value : number ;
1064
1069
let labelSize : number = titleSize + innerPadding + this . titlePadding + this . labelPadding +
@@ -1075,6 +1080,15 @@ export class Axis extends ChildProperty<Axis> {
1075
1080
labelSize = ( diff < labelSize ) ? ( labelSize - diff ) : 0 ;
1076
1081
}
1077
1082
}
1083
+ if ( this . isAxisOpposedPosition ) {
1084
+ definition . insideFarSizes . push ( labelSize ) ;
1085
+ }
1086
+ else {
1087
+ definition . insideNearSizes . push ( labelSize ) ;
1088
+ }
1089
+ if ( this . labelPosition === 'Inside' ) {
1090
+ return titleSize + innerPadding ;
1091
+ }
1078
1092
return labelSize ;
1079
1093
}
1080
1094
/**
0 commit comments