@@ -12,6 +12,9 @@ import { assignContextMenu } from '../gui/menu.mjs';
1212
1313class TBoxPainter extends ObjectPainter {
1414
15+ #border_mode;
16+ #border_size;
17+
1518 /** @summary start of drag handler
1619 * @private */
1720 moveStart ( x , y ) {
@@ -72,9 +75,9 @@ class TBoxPainter extends ObjectPainter {
7275 ww = Math . round ( Math . abs ( this . x2 - this . x1 ) ) ,
7376 hh = Math . round ( Math . abs ( this . y1 - this . y2 ) ) ,
7477 path = `M${ xx } ,${ yy } h${ ww } v${ hh } h${ - ww } z` ;
75- if ( ! this . borderMode )
78+ if ( ! this . #border_mode )
7679 return [ path ] ;
77- return [ path ] . concat ( getBoxDecorations ( xx , yy , ww , hh , this . borderMode , this . borderSize , this . borderSize ) ) ;
80+ return [ path ] . concat ( getBoxDecorations ( xx , yy , ww , hh , this . #border_mode , this . #border_size , this . #border_size ) ) ;
7881 }
7982
8083 /** @summary Redraw box */
@@ -103,8 +106,8 @@ class TBoxPainter extends ObjectPainter {
103106 if ( this . swap_xy )
104107 [ this . x1 , this . x2 , this . y1 , this . y2 ] = [ this . y1 , this . y2 , this . x1 , this . x2 ] ;
105108
106- this . borderMode = ( box . fBorderMode && this . fillatt . hasColor ( ) ) ? box . fBorderMode : 0 ;
107- this . borderSize = box . fBorderSize || 2 ;
109+ this . #border_mode = ( box . fBorderMode && this . fillatt . hasColor ( ) ) ? box . fBorderMode : 0 ;
110+ this . #border_size = box . fBorderSize || 2 ;
108111
109112 const paths = this . getPathes ( ) ;
110113
@@ -113,7 +116,7 @@ class TBoxPainter extends ObjectPainter {
113116 . call ( this . lineatt . func )
114117 . call ( this . fillatt . func ) ;
115118
116- if ( this . borderMode ) {
119+ if ( this . #border_mode ) {
117120 g . append ( 'svg:path' )
118121 . attr ( 'd' , paths [ 1 ] )
119122 . call ( this . fillatt . func )
0 commit comments