[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] maps: Fix basic feature colour when only "color" is provided (lost from failed MR !9936)
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69fb1eee3979c_382d8c008332@gitlab-sidekiq-low-urgency-cpu-bound-v2-86f6fb9995-bfp5r.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: 554a4ee4 by Jonny Bradley at 2026-05-06T10:58:51+00:00 [FIX] maps: Fix basic feature colour when only "color" is provided (lost from failed MR !9936) (cherry picked from commit b8714d65c0d86cda93d34ee7a4f1b9c35cf50707) Co-authored-by: Jonny Bradley <[email protected]> - - - - - 1 changed file: - src/js/jquery-tiki/tiki-maps-ol3.js Changes: ===================================== src/js/jquery-tiki/tiki-maps-ol3.js ===================================== @@ -295,10 +295,9 @@ import { defaults as defaultControls } from "ol/control"; let fillColor = feature.get("fillColor"); if (!fillColor) { - // from theme-customizer.js - //fillColor = lightenDarkenColor(borderColor, -10); - fillColor = borderColor; - borderColor = "#666"; + // no separate fill colour provided so make the fill 50% opacity of the border + const rgba = Array.from(ol.color.asArray(borderColor)); + fillColor = ol.color.asString([rgba[0], rgba[1], rgba[2], rgba[3] / 2]); } return new ol.style.Style({ @@ -1621,6 +1620,7 @@ import { defaults as defaultControls } from "ol/control"; feature.set("itemId", i.object_id); feature.set("content", i.title); if (!feature.get("color")) { + // TODO find a better default, from the searchlayer maybe? feature.set("color", "#ffa500"); } if (!feature.get("intent")) { View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/554a4ee4b0dfbe467fc8714a0fe2b7eae2865490 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/554a4ee4b0dfbe467fc8714a0fe2b7eae2865490 You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs