forked from ddrilling/asb_cloud_front
Исправлена адаптивность шрифта в подсказке
This commit is contained in:
parent
f336ceb698
commit
16ae6959cf
@ -22,7 +22,6 @@ export type D3HorizontalCursorSettings<DataType extends BaseDataType> = {
|
||||
style?: CSSProperties
|
||||
limit?: number
|
||||
lineStyle?: SVGProps<SVGLineElement>
|
||||
adaptiveTooltipSmall?: boolean
|
||||
}
|
||||
|
||||
export type D3HorizontalCursorProps<DataType extends BaseDataType> = D3HorizontalCursorSettings<DataType> & {
|
||||
@ -73,7 +72,6 @@ const _D3HorizontalCursor = <DataType extends BaseDataType>({
|
||||
style: _style = {},
|
||||
limit = 2,
|
||||
lineStyle: _lineStyle,
|
||||
adaptiveTooltipSmall = false,
|
||||
|
||||
data,
|
||||
groups,
|
||||
@ -191,7 +189,7 @@ const _D3HorizontalCursor = <DataType extends BaseDataType>({
|
||||
style={{ transition: 'opacity .1s ease-out', userSelect: fixed ? 'auto' : 'none' }}
|
||||
>
|
||||
<div className={'tooltip-wrapper'}>
|
||||
<div className={`adaptive-tooltip ${adaptiveTooltipSmall ? 'adaptive-tooltip-small' : ''} tooltip ${position} ${className}`}
|
||||
<div className={`tooltip ${position} ${className}`}
|
||||
style={{height: 'auto', bottom: `${position === 'bottom' ? '0' : ''}`}}
|
||||
>
|
||||
<div className={'tooltip-content'}>
|
||||
|
@ -142,7 +142,6 @@ export type D3MonitoringChartsProps<DataType extends BaseDataType> = Omit<React.
|
||||
spaceBetweenGroups?: number
|
||||
/** Название графика для сохранения в базе */
|
||||
chartName?: string
|
||||
adaptiveTooltipSmall?: boolean
|
||||
methods?: (value: {
|
||||
setSettingsVisible: (visible: boolean) => void
|
||||
}) => void
|
||||
@ -192,7 +191,6 @@ const _D3MonitoringCharts = <DataType extends Record<string, unknown>>({
|
||||
dash,
|
||||
chartName,
|
||||
methods,
|
||||
adaptiveTooltipSmall = false,
|
||||
|
||||
className = '',
|
||||
...other
|
||||
@ -572,7 +570,6 @@ const _D3MonitoringCharts = <DataType extends Record<string, unknown>>({
|
||||
spaceBetweenGroups={spaceBetweenGroups}
|
||||
data={data}
|
||||
height={height}
|
||||
adaptiveTooltipSmall={adaptiveTooltipSmall}
|
||||
/>
|
||||
</D3MouseZone>
|
||||
</svg>
|
||||
|
@ -302,7 +302,6 @@ const TelemetryView = memo(() => {
|
||||
},
|
||||
}}
|
||||
height={'70vh'}
|
||||
adaptiveTooltipSmall
|
||||
/>
|
||||
</GridItem>
|
||||
<GridItem col={'2'} row={'3'} colSpan={'7'}>
|
||||
|
@ -15,10 +15,10 @@
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
|
||||
font-size: 13px;
|
||||
font-size: calc(7px + 6 * (100vw - 1024px) / 896);
|
||||
color: @color;
|
||||
position: absolute;
|
||||
padding: 5px;
|
||||
padding: calc(0px + 5 * (100vw - 1024px) / 896);
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background-color: @bg-color;
|
||||
@ -120,34 +120,3 @@
|
||||
stroke: #ddd;
|
||||
stroke-dasharray: 4;
|
||||
}
|
||||
|
||||
@media (max-width: 1800px) {
|
||||
.asb-d3-chart .adaptive-tooltip {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1600px) {
|
||||
.asb-d3-chart .adaptive-tooltip {
|
||||
font-size: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1440px) {
|
||||
.asb-d3-chart .adaptive-tooltip {
|
||||
font-size: 8px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1310px) {
|
||||
.asb-d3-chart .adaptive-tooltip-small {
|
||||
font-size: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1279px) {
|
||||
.asb-d3-chart .adaptive-tooltip-small {
|
||||
font-size: 6px;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user