Skip to content

fix(map): set imageBorder on resource cells for visible outlines#239

Open
vuntz wants to merge 1 commit intodevfrom
MON-196738-map-fix-resource-image-border
Open

fix(map): set imageBorder on resource cells for visible outlines#239
vuntz wants to merge 1 commit intodevfrom
MON-196738-map-fix-resource-image-border

Conversation

@vuntz
Copy link
Copy Markdown
Member

@vuntz vuntz commented Mar 30, 2026

Description

Fixes: MON-196738

Commit ed4ec78 removed the setCellStyles(IMAGE_BORDER) calls that were
setting imageBorder on cells at insertion time. This was done because the
hardcoded color values (#000000/#ffffff) did not adapt to theme changes.
However, mxImageShape only draws its border rect when imageBorder is
non-null, so removing it made resource outlines invisible in the editor.

This PR sets imageBorder to "default" instead of a hardcoded color. This
lets drawio's replaceDefaultColors resolve it to the correct theme-aware
foreground color at render time. The centreon-map frontend translates between
"default" (drawio) and "#" (backend sentinel) on load/save.

Companion PR in centreon-modules: https://github.com/centreon/centreon-modules/pull/7796

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

Commit ed4ec78 removed the setCellStyles(IMAGE_BORDER) calls that
were setting imageBorder on cells at insertion time. This was done
because the hardcoded color values did not adapt to theme changes.
However, mxImageShape only draws its border when imageBorder is set,
so removing it made resource outlines invisible in the editor.

Set imageBorder to "default" instead of a hardcoded color. This lets
drawio's replaceDefaultColors resolve it to the correct theme color
at render time, while the centreon-map frontend translates between
"default" (drawio) and "#" (backend sentinel) on load/save.

Refs: MON-196738
@vuntz vuntz requested a review from a team as a code owner March 30, 2026 15:25
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.

1 participant