Skip to content

Commit

Permalink
Remove unwanted "as any"
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Mar 13, 2024
1 parent e7a9e8f commit 8e587b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/MapMaplibreGl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default class MapMaplibreGl extends React.Component<MapMaplibreGlProps, M
showInspectButton: false,
blockHoverPopupOnClick: true,
assignLayerColor: (layerId: string, alpha: number) => {
return Color(colors.brightColor(layerId, alpha as any)).desaturate(0.5).string()
return Color(colors.brightColor(layerId, alpha)).desaturate(0.5).string()
},
buildInspectStyle: (originalMapStyle: StyleSpecification, coloredLayers: HighlightedLayer[]) => buildInspectStyle(originalMapStyle, coloredLayers, this.props.highlightedLayer),
renderPopup: (features: InspectFeature[]) => {
Expand Down
2 changes: 1 addition & 1 deletion src/libs/highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function colorHighlightedLayer(layer?: LayerSpecification): HighlightedLa
if(!layer || layer.type === 'background' || layer.type === 'raster') return null

const sourceLayerId = layer['source-layer'] || ''
const color = colors.brightColor(sourceLayerId, 1 as any);
const color = colors.brightColor(sourceLayerId, 1);

if(layer.type === "fill" || layer.type === 'fill-extrusion') {
return changeLayer(stylegen.polygonLayer(color, color, layer.source, layer['source-layer']), layer)
Expand Down

0 comments on commit 8e587b7

Please sign in to comment.