Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
4535ef09
Commit
4535ef09
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
rename of method name
parent
368c6675
No related branches found
No related tags found
1 merge request
!5
Frontend refactor
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend-js/src/main/js/map/CustomMap.js
+20
-20
20 additions, 20 deletions
frontend-js/src/main/js/map/CustomMap.js
with
20 additions
and
20 deletions
frontend-js/src/main/js/map/CustomMap.js
+
20
−
20
View file @
4535ef09
...
...
@@ -145,37 +145,37 @@ CustomMap.prototype.clearDbOverlays = function() {
};
/**
* Removes all markers from {@link
OverlayCollection
}.
* Removes all markers from {@link
AbstractDbOverlay
}.
*
* @param collection
* {@link OverlayCollection} from which all markers should be removed
*/
CustomMap
.
prototype
.
hideMarkersForOverlay
Collection
=
function
(
collection
)
{
logger
.
debug
(
"
Clear
collection:
"
+
collection
.
name
);
for
(
var
aliasKey
in
collection
.
aliasMarkers
)
{
if
(
collection
.
aliasMarkers
.
hasOwnProperty
(
aliasKey
)
&&
collection
.
aliasMarkers
[
aliasKey
]
!==
undefined
&&
collection
.
aliasMarkers
[
aliasKey
]
!==
null
)
{
collection
.
aliasMarkers
[
aliasKey
].
setMap
(
null
);
CustomMap
.
prototype
.
hideMarkersFor
Db
Overlay
=
function
(
dbOverlay
)
{
logger
.
debug
(
"
Clear
dbOverlay:
"
+
dbOverlay
.
name
);
for
(
var
aliasKey
in
dbOverlay
.
aliasMarkers
)
{
if
(
dbOverlay
.
aliasMarkers
.
hasOwnProperty
(
aliasKey
)
&&
dbOverlay
.
aliasMarkers
[
aliasKey
]
!==
undefined
&&
dbOverlay
.
aliasMarkers
[
aliasKey
]
!==
null
)
{
dbOverlay
.
aliasMarkers
[
aliasKey
].
setMap
(
null
);
}
}
for
(
var
pointKey
in
collection
.
pointMarkers
)
{
if
(
collection
.
pointMarkers
.
hasOwnProperty
(
pointKey
)
&&
collection
.
pointMarkers
[
pointKey
]
!==
undefined
&&
collection
.
pointMarkers
[
pointKey
]
!==
null
)
{
collection
.
pointMarkers
[
pointKey
].
setMap
(
null
);
for
(
var
pointKey
in
dbOverlay
.
pointMarkers
)
{
if
(
dbOverlay
.
pointMarkers
.
hasOwnProperty
(
pointKey
)
&&
dbOverlay
.
pointMarkers
[
pointKey
]
!==
undefined
&&
dbOverlay
.
pointMarkers
[
pointKey
]
!==
null
)
{
dbOverlay
.
pointMarkers
[
pointKey
].
setMap
(
null
);
}
}
for
(
var
key
in
collection
.
reactionMarkers
)
{
if
(
collection
.
reactionMarkers
.
hasOwnProperty
(
key
)
&&
collection
.
reactionMarkers
[
key
]
!==
undefined
&&
collection
.
reactionMarkers
[
key
]
!==
null
)
{
collection
.
reactionMarkers
[
key
].
setMap
(
null
);
for
(
var
key
in
dbOverlay
.
reactionMarkers
)
{
if
(
dbOverlay
.
reactionMarkers
.
hasOwnProperty
(
key
)
&&
dbOverlay
.
reactionMarkers
[
key
]
!==
undefined
&&
dbOverlay
.
reactionMarkers
[
key
]
!==
null
)
{
dbOverlay
.
reactionMarkers
[
key
].
setMap
(
null
);
}
}
collection
.
aliasMarkers
=
[];
collection
.
pointMarkers
=
[];
collection
.
reactionMarkers
=
[];
dbOverlay
.
aliasMarkers
=
[];
dbOverlay
.
pointMarkers
=
[];
dbOverlay
.
reactionMarkers
=
[];
};
/**
...
...
@@ -188,7 +188,7 @@ CustomMap.prototype.hideMarkersForOverlayCollection = function(collection) {
* after update, <code>false</code> otherwise
*/
CustomMap
.
prototype
.
updateOverlayCollection
=
function
(
overlayCollection
,
fitBounds
)
{
this
.
hideMarkersForOverlay
Collection
(
overlayCollection
);
this
.
hideMarkersFor
Db
Overlay
(
overlayCollection
);
return
this
.
renderOverlayCollection
({
overlayCollection
:
overlayCollection
,
fitBounds
:
fitBounds
...
...
@@ -312,7 +312,7 @@ CustomMap.prototype.refreshComments = function() {
var
collection
=
self
.
getOverlayByName
(
"
comment
"
);
if
(
collection
!==
undefined
)
{
self
.
hideMarkersForOverlay
Collection
(
collection
);
self
.
hideMarkersFor
Db
Overlay
(
collection
);
if
(
ServerConnector
.
getSessionData
(
self
.
getProject
()).
getShowComments
())
{
return
collection
.
refresh
().
then
(
function
()
{
return
self
.
renderOverlayCollection
({
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment