TP-85622 | tooltip shape (#645)
Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>
This commit is contained in:
@@ -385,7 +385,6 @@ class DrawPeaks(
|
||||
when (peakPosition) {
|
||||
PeakPosition.START -> {
|
||||
val peakStart = 0f
|
||||
val peakEnd = peakStart + peakWidth
|
||||
drawArc(
|
||||
path,
|
||||
peakStart + peakWidth - bottomPeakRadius,
|
||||
@@ -407,8 +406,8 @@ class DrawPeaks(
|
||||
}
|
||||
PeakPosition.CENTER -> {
|
||||
var peakStart =
|
||||
offset ?: (size.width / 2 - peakWidth / 2 - (size.width / 2 * offsetPercentage))
|
||||
var peakEnd = peakStart + peakWidth
|
||||
(offset ?: (size.width / 2 - (size.width / 2 * offsetPercentage))) -
|
||||
peakWidth / 2
|
||||
|
||||
val minimumPeakStart =
|
||||
max(
|
||||
@@ -424,7 +423,7 @@ class DrawPeaks(
|
||||
)
|
||||
|
||||
peakStart = peakStart.coerceIn(minimumPeakStart, maximumPeakStart)
|
||||
peakEnd = peakStart + peakWidth
|
||||
val peakEnd = peakStart + peakWidth
|
||||
|
||||
drawArc(
|
||||
path,
|
||||
@@ -456,7 +455,6 @@ class DrawPeaks(
|
||||
}
|
||||
PeakPosition.END -> {
|
||||
val peakStart = size.width - peakWidth
|
||||
val peakEnd = size.width
|
||||
drawArc(
|
||||
path,
|
||||
size.width - peakRadius * 2,
|
||||
|
||||
Reference in New Issue
Block a user