   ctx.lineTo(pt.x + offsetX, pt.y + MESSSAGE_ARROW_WIDTH)
   ctx.stroke()
 
-drawMessageText = (ctx, x, y, body) ->
-  width = ctx.measureText(body).width
+drawMessageText = (ctx, x, y, width, body) ->
   ctx.fillStyle = "white"
   ctx.fillRect(x - width / 2, y , width, 12)
   ctx.fillStyle = "black"

  bodyPt = obj.normalMessage.bodyPoint
  drawMessageLine(ctx, obj.rect, obj.is_return)
  drawMessageArrowhead(ctx, headPt, isHeadLeft(obj))
  drawMessageText(ctx, bodyPt.x, bodyPt.y, obj.body)

isHeadLeft = (obj) ->
  obj.to.order <= obj.from.order

  bodyPt = obj.selfMessage.bodyPoint
  drawSelfMessagePath(ctx, obj.selfMessage.rect)
  drawMessageArrowhead(ctx, headPt, true)
  drawMessageText(ctx, bodyPt.x, bodyPt.y, obj.rect.bodyWidth, obj.body)

drawSelfMessagePath = (ctx, rect) ->
  ctx.beginPath()
