From ed8f0aeffb619c0540b16420320973207c55f015 Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Fri, 23 Mar 2018 08:52:49 +0800 Subject: [PATCH] 地图点击关闭弹窗 --- src/main/webapp/js/moralmap.js | 6 ++++-- src/main/webapp/view/map.jsp | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js index 83dadce..57a3d85 100644 --- a/src/main/webapp/js/moralmap.js +++ b/src/main/webapp/js/moralmap.js @@ -245,10 +245,12 @@ } //������������ moralMap.showPopupbox = function(id) { - $(id).css('display', 'block'); + setTimeout(function () { + $(id).css('display', 'block'); + },1); } moralMap.closePopupbox = function(id) { - $(id).css('display', 'none'); + $(id).css('display', 'none'); } moralMap.isPopupBoxShow = function(id) { return $(id).css('display') == 'block'; diff --git a/src/main/webapp/view/map.jsp b/src/main/webapp/view/map.jsp index 091dcdd..eaf7569 100644 --- a/src/main/webapp/view/map.jsp +++ b/src/main/webapp/view/map.jsp @@ -384,6 +384,10 @@ //��������������������� ���������������,��������� moralMap.addEventListener("tilesloaded", function(type, target) { }); + // ������������������ ������������ + moralMap.addEventListener("click", function(type, target) { + moralMap.closePopupbox("#popup_box"); + }); //������������������������������������������ moralMap.addEventListener('zoomstart', function(type) {}); //������������������������������������������ -- Gitblit v1.8.0