File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ type TPriceLineProps = {
15
15
foregroundColor : string ;
16
16
color ?: string ;
17
17
opacityOnOverlap : number ;
18
+ title ?: string ;
18
19
} ;
19
20
20
21
const PriceLine = ( {
@@ -26,6 +27,7 @@ const PriceLine = ({
26
27
hideOffscreenLine,
27
28
hideBarrierLine,
28
29
store,
30
+ title,
29
31
} : TPriceLineProps ) => {
30
32
const {
31
33
className,
@@ -41,7 +43,6 @@ const PriceLine = ({
41
43
priceDisplay,
42
44
priceLineWidth,
43
45
setDragLine,
44
- title,
45
46
visible,
46
47
} = store ;
47
48
@@ -59,6 +60,7 @@ const PriceLine = ({
59
60
if ( ! showBarrier ) return null ;
60
61
61
62
const width = priceLineWidth + 12 ;
63
+ const price_right_offset = ( isOverlappingWithPriceLine ? width - overlappedBarrierWidth : 0 ) + ( isMobile ? 20 : 4 ) ;
62
64
63
65
return (
64
66
< div
@@ -88,13 +90,12 @@ const PriceLine = ({
88
90
< div className = 'draggable-area' />
89
91
< div className = 'draggable-area-wrapper' >
90
92
< div
91
- className = { 'drag-price' }
93
+ className = 'drag-price'
92
94
style = { {
93
95
backgroundColor : color ,
94
96
width : isOverlappingWithPriceLine ? overlappedBarrierWidth : width ,
95
97
opacity,
96
- right :
97
- ( isOverlappingWithPriceLine ? width - overlappedBarrierWidth : 0 ) + ( isMobile ? 20 : 4 ) ,
98
+ right : price_right_offset ,
98
99
} }
99
100
>
100
101
< HamburgerDragIcon />
@@ -122,7 +123,12 @@ const PriceLine = ({
122
123
) }
123
124
</ div >
124
125
{ title && (
125
- < PriceLineTitle color = { color } title = { title } yAxiswidth = { overlappedBarrierWidth } opacity = { opacity } />
126
+ < PriceLineTitle
127
+ color = { color }
128
+ title = { title }
129
+ yAxiswidth = { width + price_right_offset }
130
+ opacity = { opacity }
131
+ />
126
132
) }
127
133
</ div >
128
134
</ div >
You can’t perform that action at this time.
0 commit comments