* Calculate the shift in x for text and text2 elements
(hoverLabel)
| 2030 | * Calculate the shift in x for text and text2 elements |
| 2031 | */ |
| 2032 | function getTextShiftX(hoverLabel) { |
| 2033 | var alignShift = { start: 1, end: -1, middle: 0 }[hoverLabel.anchor]; |
| 2034 | var textShiftX = alignShift * (HOVERARROWSIZE + HOVERTEXTPAD); |
| 2035 | var text2ShiftX = textShiftX + alignShift * (hoverLabel.txwidth + HOVERTEXTPAD); |
| 2036 | |
| 2037 | var isMiddle = hoverLabel.anchor === 'middle'; |
| 2038 | if (isMiddle) { |
| 2039 | textShiftX -= hoverLabel.tx2width / 2; |
| 2040 | text2ShiftX += hoverLabel.txwidth / 2 + HOVERTEXTPAD; |
| 2041 | } |
| 2042 | |
| 2043 | return { |
| 2044 | alignShift: alignShift, |
| 2045 | textShiftX: textShiftX, |
| 2046 | text2ShiftX: text2ShiftX |
| 2047 | }; |
| 2048 | } |
| 2049 | |
| 2050 | function alignHoverText(hoverLabels, rotateLabels, scaleX, scaleY) { |
| 2051 | var pX = function (x) { |
no outgoing calls
no test coverage detected
searching dependent graphs…