From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit-assets v2 1/1] charts: add necessary classes for Map
Date: Tue, 5 May 2026 09:31:55 +0200 [thread overview]
Message-ID: <20260505073203.398548-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260505073203.398548-1-d.csapak@proxmox.com>
these classes are used by the new Map<T> widget.
The map contains several widget that need some styling:
* map info: we need to set the z-index and reset transition in case this
is set somewhere.
* the map itself: needs to disable touch actions and set it's width and
height to 100%
* the map-location: is a circle with a color specified via the
'pwt-location-color' variable (so it's easier to set in a nested
element)
* the interaction-panel: is placed on the top right
* the location-pulse: a small animation that represents loading and
highlights a selected element.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
scss/_charts.scss | 63 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/scss/_charts.scss b/scss/_charts.scss
index 0f5e87e..ad51b0e 100644
--- a/scss/_charts.scss
+++ b/scss/_charts.scss
@@ -12,3 +12,66 @@
.pwt-legend-color {
color: var(--pwt-legend-color)
}
+
+/// Class `pwt-map-info`
+///
+/// This is used for the info panel when a point is clicked on a map
+.pwt-map-info {
+ transition: 0s;
+ z-index: 100;
+}
+
+/// Class `pwt-map`
+///
+/// This is used for the base SVG element of the map
+.pwt-map {
+ width: 100%;
+ height: 100%;
+ touch-action: none;
+ display: block;
+}
+
+/// Class `pwt-location`
+///
+/// This is used for a location displayed on a `Map`
+/// It uses the `--pwt-location-color` so it can be easily
+/// overwritten via css.'
+.pwt-map-location {
+ --pwt-location-color: var(--pwt-color-primary);
+ cursor: pointer;
+
+ & > circle {
+ fill: color-mix(in lab, var(--pwt-location-color), transparent 80%);
+ stroke: var(--pwt-location-color);
+ stroke-width: 2px;
+ r: calc(var(--pwt-location-radius) - 2px);
+ vector-effect: non-scaling-stroke;
+ }
+}
+
+/// Class `pwt-map-interaction-panel`
+///
+/// Is used for positioning the panel containing the interactive elements of
+/// a map
+.pwt-map-interaction-panel {
+ position: absolute;
+ inset: var(--pwt-spacer-2) var(--pwt-spacer-2) auto auto;
+}
+
+/// Class `pwt-location-animated`
+///
+/// This is used for animating a selected Location
+.pwt-map-location-animated {
+ animation: pwt-location-pulse 1.2s infinite;
+}
+
+@keyframes pwt-location-pulse {
+ from {
+ r: var(--pwt-location-radius);
+ opacity:100%;
+ }
+ to {
+ r: calc(var(--pwt-location-radius) * 1.5);
+ opacity:0%;
+ }
+}
--
2.47.3
next prev parent reply other threads:[~2026-05-05 7:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 7:31 [PATCH datacenter-manager/yew-widget-toolkit/yew-widget-toolkit-assets v2 0/8] add a new map widget for custom views Dominik Csapak
2026-05-05 7:31 ` [PATCH yew-widget-toolkit v2 1/3] js-helper: add client-to-svg-coordinate conversion helper Dominik Csapak
2026-05-05 7:31 ` [PATCH yew-widget-toolkit v2 2/3] widget: charts: add interactive Map with zoom/pan and clustering Dominik Csapak
2026-05-05 7:31 ` [PATCH yew-widget-toolkit v2 3/3] widget: charts: add WorldMap with GeoJSON rendering Dominik Csapak
2026-05-05 7:31 ` Dominik Csapak [this message]
2026-05-05 7:31 ` [PATCH datacenter-manager v2 1/4] lib/api/ui: add location property to remote config Dominik Csapak
2026-05-05 8:26 ` Thomas Lamprecht
2026-05-05 8:36 ` Dominik Csapak
2026-05-05 8:44 ` Thomas Lamprecht
2026-05-05 8:46 ` Dominik Csapak
2026-05-05 7:31 ` [PATCH datacenter-manager v2 2/4] lib/api: add new 'remote-list' info to the resource status Dominik Csapak
2026-05-05 7:31 ` [PATCH datacenter-manager v2 3/4] ui: add world map geojson update script Dominik Csapak
2026-05-05 7:31 ` [PATCH datacenter-manager v2 4/4] ui: views: add map component Dominik Csapak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260505073203.398548-5-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.