@@ -316,15 +316,19 @@ const rect = (parent, node) => {
316
316
// add the rect
317
317
const rect = shapeSvg . insert ( 'rect' , ':first-child' ) ;
318
318
319
- const totalWidth = bbox . width + node . padding * 2 ;
320
- const totalHeight = bbox . height + node . padding * 2 ;
319
+ // const totalWidth = bbox.width + node.padding * 2;
320
+ // const totalHeight = bbox.height + node.padding * 2;
321
+ const totalWidth = bbox . width + node . padding ;
322
+ const totalHeight = bbox . height + node . padding ;
321
323
rect
322
324
. attr ( 'class' , 'basic label-container' )
323
325
. attr ( 'style' , node . style )
324
326
. attr ( 'rx' , node . rx )
325
327
. attr ( 'ry' , node . ry )
326
- . attr ( 'x' , - bbox . width / 2 - node . padding )
327
- . attr ( 'y' , - bbox . height / 2 - node . padding )
328
+ // .attr('x', -bbox.width / 2 - node.padding)
329
+ // .attr('y', -bbox.height / 2 - node.padding)
330
+ . attr ( 'x' , - bbox . width / 2 - halfPadding )
331
+ . attr ( 'y' , - bbox . height / 2 - halfPadding )
328
332
. attr ( 'width' , totalWidth )
329
333
. attr ( 'height' , totalHeight ) ;
330
334
@@ -351,7 +355,7 @@ const rect = (parent, node) => {
351
355
const labelRect = ( parent , node ) => {
352
356
const { shapeSvg } = labelHelper ( parent , node , 'label' , true ) ;
353
357
354
- log . info ( 'Classes = ' , node . classes ) ;
358
+ log . trace ( 'Classes = ' , node . classes ) ;
355
359
// add the rect
356
360
const rect = shapeSvg . insert ( 'rect' , ':first-child' ) ;
357
361
0 commit comments