Fix UI loading issue on Safari 11.0.3 (#1212)

* Fix UI loading issue on Safari 11.0.3

Fix the issue of operation logs and location doesn't display on device detail page on safari browser 11.0.3

Fixes wso2/product-iots#1752

* Add comments describing code lines
revert-70aa11f8
Madhawa Perera 7 years ago committed by GitHub
parent 873bff0042
commit 3fa513cabd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -736,6 +736,7 @@
var geoLocationLink = $(".initGeoLocationLink");
if (geoLocationLink) {
geoLocationLink.on('click', function () {
loadGeoFencing();
initializeGeoLocation({{geoServicesEnabled}});
});
geoPublicUri = $("#geo-charts").data("geo-public-uri");

@ -46,7 +46,8 @@ function initialLoad(geoFencingEnabled) {
}
function initializeMap() {
if (typeof(map) !== 'undefined') {
///map.zoomControl is added to fix UI loading issue on Safari
if (typeof(map) !== 'undefined' && map.zoomControl != null) {
map.remove();
}
if (document.getElementById('map') == null) {

@ -23,10 +23,9 @@ var drawnItems;
var lastId;
var controlDiv;
loadGeoFencing();
function loadGeoFencing() {
if (map == null) {
///map.zoomControl is added to fix UI loading issue on Safari
if (map == null || map.zoomControl == null) {
setTimeout(loadGeoFencing, 1000); // give everything some time to render
} else {
map.on('draw:created', function (e) {

Loading…
Cancel
Save