Fix: add getPin function and improve code formatting in draw-markers#1349
Merged
Fix: add getPin function and improve code formatting in draw-markers#1349
Conversation
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the marker rendering code to expose a reusable getPin helper globally (so other modules can render marker pins consistently) and applies some formatting/refactoring changes in the marker renderer.
Changes:
- Expose
getPin(shape, fill, stroke)onwindowand add its global type declaration. - Refactor marker destructuring and markers list rendering into more compact expressions.
- Apply formatting changes in
draw-markers.ts.
Comments suppressed due to low confidence (4)
src/renderers/draw-markers.ts:1
import {rn}is not Biome-formatted (the repo’s CI runsbiome ci .). Please runnpm run format/biome formatand commit the formatting output so CI doesn’t fail on spacing inside import braces.
import { rn } from "../utils";
src/renderers/draw-markers.ts:25
type PinShapes = {[key: string]: PinShapeFunction};isn’t Biome-formatted (spacing inside braces). Since CI enforces Biome formatting, please reformat this type (e.g., runnpm run format) and commit the result.
type PinShapes = { [key: string]: PinShapeFunction };
src/renderers/draw-markers.ts:62
- This destructuring assignment was collapsed into a very long single line and is likely to be re-wrapped by Biome, which would cause
biome cito fail. Please apply the Biome formatter (or manually re-wrap) and commit the formatted output.
const {
src/renderers/draw-markers.ts:85
markersData.map(marker => ...)is not consistent with Biome formatting used elsewhere insrc/**/*.ts(and may be rewritten by the formatter), which can failbiome ci. Please reformat this callback to match the repository’s standard arrow-function style.
<text x="${dx}%" y="${dy}%" font-size="${px}px" >${isExternal ? "" : icon}</text>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Versioning