Skip to content

fix: Allow 'none' line color for shape features#94

Merged
ThomasHalwax merged 6 commits intomainfrom
fix/shape-line-none
Feb 15, 2026
Merged

fix: Allow 'none' line color for shape features#94
ThomasHalwax merged 6 commits intomainfrom
fix/shape-line-none

Conversation

@axel-krapotke
Copy link
Contributor

When selecting the empty/none swatch in the line color palette, shapes now correctly render without a stroke. Previously, the fallback to #000000 made it impossible to remove the polygon border.

Changes:

  • shape.js: Only render stroke when line-color is explicitly set. Override registry defaults with transparent/0 for fill-only rendering.
  • ShapeProperties.js: Persist null instead of undefined for 'none' and correctly detect the unset state in the UI.

Root cause: The styleRegistry merges defaults (including line-color: #000000) with style props. When no line-color property was present in the style object, the registry default bled through.

axel-krapotke and others added 6 commits February 13, 2026 13:17
…and rotation

- Place text on map as Point geometry with simple markdown rendering
  (# headings, ## subheadings, - bullet lists, plain text)
- Text rendered to canvas, displayed as OL Icon style
- Zoom-dependent scaling: text appears full size at creation zoom level,
  shrinks when zoomed out, minimum 15% size
- Properties panel: text input, text/background color, opacity,
  font size, rotation slider, 'Use current view as full size' button
- Sidebar tags: SHAPE + TEXT/LINE/POLYGON for all shape types
- Guard in _bbox.js for canvas icons without explicit dimensions
- getMapResolution() exposed as service for property panels
- Shapes dropdown menu showing Line, Polygon, and Text tools
- Text shape with markdown rendering (headings, bullet lists)
- Both showing the properties panel with style options
feat: Add text shapes with markdown support
When selecting the empty/none swatch in the line color palette,
shapes now correctly render without a stroke. Previously, the
fallback to '#000000' made it impossible to remove the border.

- shape.js: Only render stroke when line-color is explicitly set
- ShapeProperties.js: Persist null instead of undefined for 'none'
  and correctly detect the 'none' state in the UI
The styleRegistry merges defaults (including line-color: #000000)
with the style props from shape.js. When 'fill only, no stroke'
was selected, the style object omitted line-color entirely,
causing the registry default black stroke to bleed through.

Now explicitly sets line-color: transparent and line-width: 0
to suppress the registry default stroke.
@ThomasHalwax ThomasHalwax merged commit cfd4462 into main Feb 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants