Skip to content

Commit 0f0b078

Browse files
author
Joe Hawes
committed
HTML & CSS structure
1 parent a36b158 commit 0f0b078

File tree

11 files changed

+69
-21
lines changed

11 files changed

+69
-21
lines changed

assets/dist/waymark-js/css/waymark-js.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,15 @@
995995
background-repeat: no-repeat;
996996
background-position: left center;
997997
}
998+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster {
999+
border: 1px solid green;
1000+
}
1001+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster .waymark-cluster {
1002+
border: 1px solid red;
1003+
}
1004+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster .waymark-cluster .waymark-marker {
1005+
border: 1px solid blue;
1006+
}
9981007

9991008
/*
10001009
==================================

assets/dist/waymark-js/css/waymark-js.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/dist/waymark-js/js/waymark-js.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7725,6 +7725,8 @@ function Waymark_Map() {
77257725

77267726
//Cluster
77277727
if(Waymark.mode == 'view') {
7728+
Waymark.jq_map_container.addClass('waymark-has-cluster');
7729+
77287730
const clusterTypes = new Map([]);
77297731

77307732
//Fix - https://github.com/Leaflet/Leaflet.markercluster/issues/611#issuecomment-277670244
@@ -7751,15 +7753,16 @@ function Waymark_Map() {
77517753
console.debug(clusterTypes);
77527754

77537755
//Build HTML
7754-
let clusterHTML = '<div class="waymark-cluster">';
7755-
7756+
let clusterHTML = '';
77567757
clusterTypes.forEach((typeData, index) => {
77577758
clusterHTML += ' <div class="' + typeData.iconData.className + '" style="width:' + typeData.iconData.iconSize[0] + 'px;height:' + typeData.iconData.iconSize[1] + 'px;">' + typeData.iconData.html + '</div>';
77587759
})
7759-
7760-
clusterHTML += '</div>';
77617760

7762-
return L.divIcon({ html: clusterHTML });
7761+
return L.divIcon({
7762+
className: 'waymark-cluster',
7763+
html: clusterHTML,
7764+
iconSize: [60, 60]
7765+
});
77637766
}
77647767
});
77657768
Waymark.map.addLayer(Waymark.marker_cluster);

assets/dist/waymark-js/js/waymark-js.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

waymark-js/dist/css/waymark-js.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,15 @@
995995
background-repeat: no-repeat;
996996
background-position: left center;
997997
}
998+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster {
999+
border: 1px solid green;
1000+
}
1001+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster .waymark-cluster {
1002+
border: 1px solid red;
1003+
}
1004+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster .waymark-cluster .waymark-marker {
1005+
border: 1px solid blue;
1006+
}
9981007

9991008
/*
10001009
==================================

waymark-js/dist/css/waymark-js.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

waymark-js/dist/js/waymark-js.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7725,6 +7725,8 @@ function Waymark_Map() {
77257725

77267726
//Cluster
77277727
if(Waymark.mode == 'view') {
7728+
Waymark.jq_map_container.addClass('waymark-has-cluster');
7729+
77287730
const clusterTypes = new Map([]);
77297731

77307732
//Fix - https://github.com/Leaflet/Leaflet.markercluster/issues/611#issuecomment-277670244
@@ -7751,15 +7753,16 @@ function Waymark_Map() {
77517753
console.debug(clusterTypes);
77527754

77537755
//Build HTML
7754-
let clusterHTML = '<div class="waymark-cluster">';
7755-
7756+
let clusterHTML = '';
77567757
clusterTypes.forEach((typeData, index) => {
77577758
clusterHTML += ' <div class="' + typeData.iconData.className + '" style="width:' + typeData.iconData.iconSize[0] + 'px;height:' + typeData.iconData.iconSize[1] + 'px;">' + typeData.iconData.html + '</div>';
77587759
})
7759-
7760-
clusterHTML += '</div>';
77617760

7762-
return L.divIcon({ html: clusterHTML });
7761+
return L.divIcon({
7762+
className: 'waymark-cluster',
7763+
html: clusterHTML,
7764+
iconSize: [60, 60]
7765+
});
77637766
}
77647767
});
77657768
Waymark.map.addLayer(Waymark.marker_cluster);

waymark-js/dist/js/waymark-js.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

waymark-js/src/css/Waymark_Map_Viewer.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@
7373
background-repeat: no-repeat;
7474
background-position: left center;
7575
}
76+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster {
77+
border: 1px solid green;
78+
}
79+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster .waymark-cluster {
80+
border: 1px solid red;
81+
}
82+
.waymark-map-container.waymark-is-viewer.waymark-has-cluster .waymark-cluster .waymark-marker {
83+
border: 1px solid blue;
84+
}

waymark-js/src/js/Waymark_Map.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ function Waymark_Map() {
358358

359359
//Cluster
360360
if(Waymark.mode == 'view') {
361+
Waymark.jq_map_container.addClass('waymark-has-cluster');
362+
361363
const clusterTypes = new Map([]);
362364

363365
//Fix - https://github.com/Leaflet/Leaflet.markercluster/issues/611#issuecomment-277670244
@@ -384,15 +386,16 @@ function Waymark_Map() {
384386
console.debug(clusterTypes);
385387

386388
//Build HTML
387-
let clusterHTML = '<div class="waymark-cluster">';
388-
389+
let clusterHTML = '';
389390
clusterTypes.forEach((typeData, index) => {
390391
clusterHTML += ' <div class="' + typeData.iconData.className + '" style="width:' + typeData.iconData.iconSize[0] + 'px;height:' + typeData.iconData.iconSize[1] + 'px;">' + typeData.iconData.html + '</div>';
391392
})
392-
393-
clusterHTML += '</div>';
394393

395-
return L.divIcon({ html: clusterHTML });
394+
return L.divIcon({
395+
className: 'waymark-cluster',
396+
html: clusterHTML,
397+
iconSize: [60, 60]
398+
});
396399
}
397400
});
398401
Waymark.map.addLayer(Waymark.marker_cluster);

0 commit comments

Comments
 (0)