From 085cfd8ba2252ab1bb6dd3287cc367fc81acddec Mon Sep 17 00:00:00 2001 From: Franzz Date: Wed, 17 Jun 2026 23:42:33 +0200 Subject: [PATCH] Make project marker scale as well on hover --- src/components/project.vue | 2 +- src/scripts/icons.js | 6 ++---- src/styles/_common.scss | 5 +++-- src/styles/_page.project.map.scss | 6 +++--- src/styles/_var.scss | 3 ++- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/project.vue b/src/components/project.vue index a2bb2d6..99acbbe 100644 --- a/src/components/project.vue +++ b/src/components/project.vue @@ -401,7 +401,7 @@ export default { this.openPopup({ lnglat: [oProject.longitude, oProject.latitude], options: oProject, - offset: [0, -1 * this.markerHeight] + offset: [0, -1 * this.markerHeight * this.getStyleProperty('--zoom-scale')] }); }, openMarkerPopup(iMarkerId, sMarkerType) { diff --git a/src/scripts/icons.js b/src/scripts/icons.js index 5cf39dd..d7f8b15 100644 --- a/src/scripts/icons.js +++ b/src/scripts/icons.js @@ -13,6 +13,7 @@ import { faCircleRight, faCircleUp, faCircleXmark, + faClock, faCloudArrowUp, faCloudBolt, faCloudMoon, @@ -47,8 +48,7 @@ import { faTriangleExclamation, faVideo, faWifi, - faWind, - faClock + faWind } from '@fortawesome/free-solid-svg-icons'; function customIcon(iconName, width, height, hex, path) { @@ -92,8 +92,6 @@ const ICONS = { 'off-track': faPersonHiking, 'main': faPersonHiking, 'hitchhiking': faCarSide, - 'track-start': faPersonHiking, - 'track-end': faPersonHiking, layers: faLayerGroup, 'elev-chart': faChartArea, distance: faCircleRight, diff --git a/src/styles/_common.scss b/src/styles/_common.scss index 2ffcbf3..e6114d2 100644 --- a/src/styles/_common.scss +++ b/src/styles/_common.scss @@ -14,6 +14,7 @@ --button-width: 36px; --trans-quick: #{var.$trans-quick}; --trans-slow: #{var.$trans-slow}; + --zoom-scale: #{var.$zoom-scale}; } /* Animations */ @@ -43,7 +44,7 @@ } .flicker { - @include animate(fadeIn 0.5s infinite alternate); + @include animate(fadeIn var.$trans-slow infinite alternate); } @mixin no-text-overflow() { @@ -57,7 +58,7 @@ transform: scale(1); } 1.25% { - transform: scale(1.2); + transform: scale(var.$zoom-scale); } 2.5% { transform: scale(1); diff --git a/src/styles/_page.project.map.scss b/src/styles/_page.project.map.scss index c0d5b56..5ff4123 100644 --- a/src/styles/_page.project.map.scss +++ b/src/styles/_page.project.map.scss @@ -20,14 +20,14 @@ $thumbnail-max-size: 60px; } .maplibregl-marker { - .spot-icon-stack:is(.media, .message) { + .spot-icon-stack:is(.media, .message, .project) { display: inline-block; transform-origin: center bottom; transition: transform var.$trans-quick; } - &:hover .spot-icon-stack:is(.media, .message) { - transform: scale(1.15); + &:hover .spot-icon-stack:is(.media, .message, .project) { + transform: scale(var.$zoom-scale); } } diff --git a/src/styles/_var.scss b/src/styles/_var.scss index 30e776b..d9de129 100644 --- a/src/styles/_var.scss +++ b/src/styles/_var.scss @@ -13,4 +13,5 @@ $elem-shadow: 0px 1px 1px color.$over-img-shadow; //Transitions $trans-quick: 200ms; -$trans-slow: 500ms; \ No newline at end of file +$trans-slow: 500ms; +$zoom-scale: 1.15; \ No newline at end of file