[TikiWiki-commits] [Git][tikiwiki/tiki][master] [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 | <69fa76155e2e1_381900b4377ce@gitlab-sidekiq-low-urgency-cpu-bound-v2-6577dcdd47-7n2sh.mail> |
Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
b8714d65 by Jonny Bradley at 2026-05-05T23:58:17+01:00
[FIX] maps: Fix basic feature colour when only "color" is provided (lost from failed MR !9936)
- - - - -
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/b8714d65c0d86cda93d34ee7a4f1b9c35cf50707
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/b8714d65c0d86cda93d34ee7a4f1b9c35cf50707
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