Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadtaimoor-deriv committed Feb 5, 2024
2 parents de7f2a8 + 220a28e commit 5cd2304
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion sass/components/_barrier.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
top: 0;
user-select: none;
width: 100%;
z-index: 1;
}
/* Drag Lines and Prices */
.chart-line {
Expand Down Expand Up @@ -159,7 +160,7 @@
background-color: $color-blue;
height: 24px;
opacity: 0.3;
position: relative;
position: absolute;
right: -10px;
top: -12px;
}
Expand Down
3 changes: 3 additions & 0 deletions sass/styles/chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,9 @@ $spot-color: #0298d3;
}
}
}
.ciq-chart {
padding: 0 8px;
}
}

// To hide google translate tooltips on drag
Expand Down
5 changes: 2 additions & 3 deletions src/components/PriceLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const PriceLine = ({
setDragLine,
visible,
} = store;

const showBarrier = React.useMemo(() => !(hideOffscreenBarrier && offScreen), [hideOffscreenBarrier, offScreen]);
const showBarrierDragLine = React.useMemo(
() => !hideBarrierLine && (!hideOffscreenLine || !offScreen) && !isOverlapping,
Expand All @@ -60,7 +59,7 @@ const PriceLine = ({
if (!showBarrier) return null;

const width = priceLineWidth + 12;
const price_right_offset = (isOverlappingWithPriceLine ? width - overlappedBarrierWidth : 0) + (isMobile ? 20 : 4);
const price_right_offset = (isOverlappingWithPriceLine ? width - overlappedBarrierWidth + 6 : 0) + (isMobile ? 20 : 3);

return (
<div
Expand Down Expand Up @@ -118,7 +117,7 @@ const PriceLine = ({
{isOverlappingWithPriceLine && (
<div
className='price-overlay'
style={{ backgroundColor: color, width: width - overlappedBarrierWidth, right: -6 }}
style={{ backgroundColor: color, width: width - overlappedBarrierWidth + 6, right: isMobile ? 20 : 3 }}
/>
)}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/store/CrosshairStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class CrosshairStore {
if (dsField.constructor === Number) {
fieldValue = dsField.toString();
} else if (dsField.constructor === Date) {
fieldValue = moment(dsField).format(this.getDateTimeFormat());
fieldValue = moment(data.Date).format(this.getDateTimeFormat());
} else {
fieldValue = dsField as string;
}
Expand Down

0 comments on commit 5cd2304

Please sign in to comment.