Skip to content

Commit 9db3e61

Browse files
committed
front: kps: adjust position label
1 parent a7d5f88 commit 9db3e61

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

front/src/common/Map/Layers/GeoJSONs.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ function getSignalLayers(context: LayerContext, prefix: string): LayerProps[] {
149149
{ ...getPointLayerProps(context), id: `${prefix}geo/signal-point` },
150150
{
151151
...configKPLabelLayer({
152+
bottomOffset: 6.5,
152153
colors: context.colors,
153154
fieldName: 'extensions_sncf_kp',
154155
minzoom: 12,

front/src/common/Map/Layers/Signals.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function Signals(props: PlatformProps) {
8383
/>
8484
<OrderedLayer
8585
{...configKPLabelLayer({
86+
bottomOffset: 6.5,
8687
colors,
8788
fieldName: 'extensions_sncf_kp',
8889
minzoom: 12,

front/src/common/Map/Layers/configKPLabelLayer.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { LayerProps } from 'react-map-gl/maplibre';
44
import { Theme } from 'types';
55

66
interface PlatformProps {
7+
bottomOffset?: number;
78
colors: Theme;
89
fieldName?: string;
910
maxzoom?: number;
@@ -14,6 +15,7 @@ interface PlatformProps {
1415

1516
export default function configKPLabelLayer(props: PlatformProps) {
1617
const {
18+
bottomOffset = 2.5,
1719
colors,
1820
fieldName = 'kp',
1921
maxzoom = 24,
@@ -48,7 +50,7 @@ export default function configKPLabelLayer(props: PlatformProps) {
4850
['literal', [-2.75, 0.2]],
4951
testSideExpression('RIGHT') as ExpressionFilterSpecification,
5052
['literal', [2.75, 0.2]],
51-
['literal', [0, 2.5]],
53+
['literal', [0, bottomOffset]],
5254
],
5355
}
5456
: {

0 commit comments

Comments
 (0)