Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(20649): Always show numbers in Bivariate hex popup #964

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import {
import { invertClusters } from '~utils/bivariate';
import { getCellLabelByValue } from '~utils/bivariate/bivariateLegendUtils';
import { dispatchMetricsEvent } from '~core/metrics/dispatch';
import { configRepo } from '~core/config';
import { AppFeature } from '~core/app/types';
import { getMaxNumeratorZoomLevel } from '~utils/bivariate/getMaxZoomLevel';
import { styleConfigs } from '../stylesConfigs';
import { generatePopupContent } from '../MCDARenderer/popup';
Expand Down Expand Up @@ -55,8 +53,6 @@ const convertFillColorToRGBA = (fillColor: RGBAColor, withTransparency = true):
withTransparency ? ',' + fillColor.a : ''
})`;

const featureFlags = configRepo.get().features;

function calcValueByNumeratorDenominator(
cellValues: Exclude<GeoJsonProperties, null>,
numerator: string,
Expand Down Expand Up @@ -191,8 +187,6 @@ export class BivariateRenderer extends LogicalLayerDefaultRenderer {
/* Skip when color empty */
if (!isFeatureVisible(feature)) return true;
if (!feature.properties) return true;

const showValues = featureFlags[AppFeature.BIVARIATE_MANAGER];
const [xNumerator, xDenominator] = legend.axis.x.quotient;
const [yNumerator, yDenominator] = legend.axis.y.quotient;
const xValue = calcValueByNumeratorDenominator(
Expand Down Expand Up @@ -226,7 +220,7 @@ export class BivariateRenderer extends LogicalLayerDefaultRenderer {
cellLabel={cells[cellIndex].label}
cellIndex={cellIndex}
axis={legend.axis}
values={showValues ? { x: xValue, y: yValue } : undefined}
values={{ x: xValue, y: yValue }}
hexagonColor={rgba}
/>,
);
Expand Down