Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
accessibility-tools
accessible_gmaps
Commits
2defc1c8
Commit
2defc1c8
authored
May 13, 2016
by
Elijah Byrd
Browse files
Added logic to detect if a marker is in map bounds before hiding it. Needs performance testing.
parent
21a20b73
Pipeline
#17447
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
accessible_gmaps.js
View file @
2defc1c8
...
...
@@ -342,9 +342,13 @@
*/
accessible_gmaps
.
resetAllMarkers
=
function
(){
var
mapData
=
accessible_gmaps
.
getMapData
();
var
bounds
=
accessible_gmaps
.
map
.
getBounds
();
for
(
var
i
=
0
;
i
<
accessible_gmaps
.
markers
.
length
;
i
++
){
var
markerID
=
"
mkr-
"
+
i
;
jQuery
(
'
div#
'
+
markerID
).
css
(
'
display
'
,
'
none
'
);
var
marker
=
accessible_gmaps
.
markers
[
i
];
if
(
!
bounds
.
contains
(
marker
.
getPosition
())){
var
markerID
=
"
mkr-
"
+
i
;
jQuery
(
'
div#
'
+
markerID
).
css
(
'
display
'
,
'
none
'
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment