@@ -406,9 +406,10 @@ module.exports.Renderer = class Renderer{
406
406
lifeline . y = message_of_create . y - ( 24 + 5 ) ;
407
407
}
408
408
409
+ const TEXTOFFSET = 4 ;
409
410
// 空の名前を表示しようとすると、lifelineの表示が消えて位置計算もおかしくなるので、対処する
410
411
const show_name = ( ! / ^ \s * $ / . test ( lifeline . text ) ) ?lifeline . text :'-' ;
411
- let text = lifeline_group . text ( show_name ) . move ( lifeline . x , lifeline . y ) . font ( {
412
+ let text = lifeline_group . text ( show_name ) . move ( lifeline . x + TEXTOFFSET , lifeline . y ) . font ( {
412
413
'fill' :'#000' ,
413
414
'size' :'24px' ,
414
415
} ) ;
@@ -436,7 +437,7 @@ module.exports.Renderer = class Renderer{
436
437
. attr ( attr ) . radius ( radius ) ;
437
438
} else {
438
439
box = {
439
- 'x' :b . x - padding ,
440
+ 'x' :b . x - TEXTOFFSET ,
440
441
'y' :b . y - padding ,
441
442
'width' :b . width + ( padding * 2 ) + offset [ 0 ] ,
442
443
'height' :b . height + offset [ 1 ] ,
@@ -495,8 +496,9 @@ module.exports.Renderer = class Renderer{
495
496
let position = Message . get_position ( message , diagram ) ;
496
497
// console.log("%d %d %d", position.width, start_rank, end_rank);
497
498
const start_offset_x = start_rank * Spec . WIDTH ( ) ;
498
- position . x += start_offset_x ;
499
- position . width += ( end_rank * Spec . WIDTH ( ) ) - start_offset_x ;
499
+ const end_offset_x = end_rank * Spec . WIDTH ( ) ;
500
+ position . x += start_offset_x - 1 ; // とりあえずの調整のための理由のない1
501
+ position . width += end_offset_x - start_offset_x ;
500
502
501
503
if ( ! message . hasOwnProperty ( 'work' ) ) {
502
504
message . work = { } ;