bounce wenn status critical oder major ist
This commit is contained in:
@@ -520,8 +520,8 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
? `TileMap/img/icons/${status}-marker-icon-${iconNumber}.png`
|
? `TileMap/img/icons/${status}-marker-icon-${iconNumber}.png`
|
||||||
: `TileMap/img/icons/marker-icon-${iconNumber}.png`;
|
: `TileMap/img/icons/marker-icon-${iconNumber}.png`;
|
||||||
|
|
||||||
// Wenn der Pfad das Wort "critical" enthält, dann den Marker bouncing options setzen
|
// Wenn der Pfad das Wort "critical" oder "major" enthält, dann den Marker bouncing options setzen
|
||||||
if (path.includes("critical")) {
|
if (path.includes("critical") || path.includes("major")) {
|
||||||
// Setze Bouncing-Optionen
|
// Setze Bouncing-Optionen
|
||||||
marker.setBouncingOptions({
|
marker.setBouncingOptions({
|
||||||
bounceHeight: 15, // Höhe des Bounces
|
bounceHeight: 15, // Höhe des Bounces
|
||||||
@@ -616,7 +616,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
// Check if the icon path includes 'critical' and initiate bouncing
|
// Check if the icon path includes 'critical' and initiate bouncing
|
||||||
if (iconPath.includes("critical")) {
|
if (iconPath.includes("critical") || iconPath.includes("major")) {
|
||||||
marker.setBouncingOptions({
|
marker.setBouncingOptions({
|
||||||
bounceHeight: 15,
|
bounceHeight: 15,
|
||||||
contractHeight: 12,
|
contractHeight: 12,
|
||||||
|
|||||||
Reference in New Issue
Block a user