(offset)
| 57 | } |
| 58 | |
| 59 | _drawArgs(offset) { |
| 60 | const {top, left, bottom, right, options} = this; |
| 61 | const align = options.align; |
| 62 | let rotation = 0; |
| 63 | let maxWidth, titleX, titleY; |
| 64 | |
| 65 | if (this.isHorizontal()) { |
| 66 | titleX = _alignStartEnd(align, left, right); |
| 67 | titleY = top + offset; |
| 68 | maxWidth = right - left; |
| 69 | } else { |
| 70 | if (options.position === 'left') { |
| 71 | titleX = left + offset; |
| 72 | titleY = _alignStartEnd(align, bottom, top); |
| 73 | rotation = PI * -0.5; |
| 74 | } else { |
| 75 | titleX = right - offset; |
| 76 | titleY = _alignStartEnd(align, top, bottom); |
| 77 | rotation = PI * 0.5; |
| 78 | } |
| 79 | maxWidth = bottom - top; |
| 80 | } |
| 81 | return {titleX, titleY, maxWidth, rotation}; |
| 82 | } |
| 83 | |
| 84 | draw() { |
| 85 | const ctx = this.ctx; |
no test coverage detected