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
25d297cf
Commit
25d297cf
authored
7 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
rename AbstractOverlayElement -> AbstractSurfaceElement to match file name
parent
0072ee4a
No related branches found
No related tags found
1 merge request
!177
Small refactor
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend-js/src/main/js/map/surface/AbstractSurfaceElement.js
+22
-22
22 additions, 22 deletions
...tend-js/src/main/js/map/surface/AbstractSurfaceElement.js
with
22 additions
and
22 deletions
frontend-js/src/main/js/map/surface/AbstractSurfaceElement.js
+
22
−
22
View file @
25d297cf
...
...
@@ -8,7 +8,7 @@ var ObjectWithListeners = require('../../ObjectWithListeners');
* Class representing abstract overlay element on the map relevant for a
* specific layout.
*/
function
Abstract
Overlay
Element
(
params
)
{
function
Abstract
Surface
Element
(
params
)
{
var
self
=
this
;
// call super constructor
ObjectWithListeners
.
call
(
this
);
...
...
@@ -31,16 +31,16 @@ function AbstractOverlayElement(params) {
}
}
Abstract
Overlay
Element
.
prototype
=
Object
.
create
(
ObjectWithListeners
.
prototype
);
Abstract
Overlay
Element
.
prototype
.
constructor
=
Abstract
Overlay
Element
;
Abstract
Surface
Element
.
prototype
=
Object
.
create
(
ObjectWithListeners
.
prototype
);
Abstract
Surface
Element
.
prototype
.
constructor
=
Abstract
Surface
Element
;
Abstract
Overlay
Element
.
prototype
.
setMap
=
function
(
map
)
{
Abstract
Surface
Element
.
prototype
.
setMap
=
function
(
map
)
{
for
(
var
i
=
0
;
i
<
this
.
getGoogleMapObjects
().
length
;
i
++
)
{
this
.
getGoogleMapObjects
()[
i
].
setMap
(
map
);
}
};
Abstract
Overlay
Element
.
prototype
.
getBounds
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getBounds
=
function
()
{
var
bounds
=
new
google
.
maps
.
LatLngBounds
();
for
(
var
i
=
0
;
i
<
this
.
getGoogleMapObjects
().
length
;
i
++
)
{
bounds
.
extend
(
this
.
getGoogleMapObjects
()[
i
].
getBounds
().
getSouthWest
());
...
...
@@ -49,7 +49,7 @@ AbstractOverlayElement.prototype.getBounds = function () {
return
bounds
;
};
Abstract
Overlay
Element
.
prototype
.
isShown
=
function
()
{
Abstract
Surface
Element
.
prototype
.
isShown
=
function
()
{
var
result
=
false
;
for
(
var
i
=
0
;
i
<
this
.
getGoogleMapObjects
().
length
;
i
++
)
{
var
map
=
this
.
getGoogleMapObjects
()[
i
].
getMap
();
...
...
@@ -61,7 +61,7 @@ AbstractOverlayElement.prototype.isShown = function () {
return
result
;
};
Abstract
Overlay
Element
.
prototype
.
show
=
function
()
{
Abstract
Surface
Element
.
prototype
.
show
=
function
()
{
if
(
this
.
isShown
())
{
logger
.
warn
(
"
Surface already shown
"
);
return
;
...
...
@@ -69,23 +69,23 @@ AbstractOverlayElement.prototype.show = function () {
this
.
setMap
(
this
.
getCustomMap
().
getGoogleMap
());
};
Abstract
Overlay
Element
.
prototype
.
hide
=
function
()
{
Abstract
Surface
Element
.
prototype
.
hide
=
function
()
{
this
.
setMap
(
null
);
};
Abstract
Overlay
Element
.
prototype
.
onClickHandler
=
function
()
{
Abstract
Surface
Element
.
prototype
.
onClickHandler
=
function
()
{
return
this
.
callListeners
(
"
onClick
"
);
};
Abstract
Overlay
Element
.
prototype
.
getGoogleMarker
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getGoogleMarker
=
function
()
{
return
this
.
getGoogleMapObjects
()[
0
];
};
Abstract
Overlay
Element
.
prototype
.
getGoogleMapObjects
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getGoogleMapObjects
=
function
()
{
return
this
.
_googleMapObjects
;
};
Abstract
Overlay
Element
.
prototype
.
addGoogleMapObject
=
function
(
googleObject
)
{
Abstract
Surface
Element
.
prototype
.
addGoogleMapObject
=
function
(
googleObject
)
{
this
.
_googleMapObjects
.
push
(
googleObject
);
var
self
=
this
;
...
...
@@ -95,34 +95,34 @@ AbstractOverlayElement.prototype.addGoogleMapObject = function (googleObject) {
google
.
maps
.
event
.
addListener
(
googleObject
,
'
click
'
,
onclick
);
};
Abstract
Overlay
Element
.
prototype
.
getIdentifiedElement
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getIdentifiedElement
=
function
()
{
return
this
.
_identifiedElement
;
};
Abstract
Overlay
Element
.
prototype
.
setIdentifiedElement
=
function
(
identifiedElement
)
{
Abstract
Surface
Element
.
prototype
.
setIdentifiedElement
=
function
(
identifiedElement
)
{
this
.
_identifiedElement
=
identifiedElement
;
};
Abstract
Overlay
Element
.
prototype
.
getBioEntity
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getBioEntity
=
function
()
{
return
this
.
_bioEntity
;
};
Abstract
Overlay
Element
.
prototype
.
setBioEntity
=
function
(
bioEntity
)
{
Abstract
Surface
Element
.
prototype
.
setBioEntity
=
function
(
bioEntity
)
{
this
.
_bioEntity
=
bioEntity
;
};
Abstract
Overlay
Element
.
prototype
.
getModelId
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getModelId
=
function
()
{
return
this
.
getIdentifiedElement
().
getModelId
();
};
Abstract
Overlay
Element
.
prototype
.
updateIdentifiedElement
=
function
(
identifiedElement
)
{
Abstract
Surface
Element
.
prototype
.
updateIdentifiedElement
=
function
(
identifiedElement
)
{
if
(
identifiedElement
.
getColor
()
!==
undefined
)
{
this
.
setColor
(
identifiedElement
.
getColor
());
}
};
Abstract
Overlay
Element
.
prototype
.
getBounds
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getBounds
=
function
()
{
var
self
=
this
;
var
bounds
=
new
google
.
maps
.
LatLngBounds
();
for
(
var
i
=
0
;
i
<
self
.
getGoogleMapObjects
().
length
;
i
++
)
{
...
...
@@ -139,12 +139,12 @@ AbstractOverlayElement.prototype.getBounds = function () {
*
* @returns {AbstractCustomMap} where surface is located
*/
Abstract
Overlay
Element
.
prototype
.
getCustomMap
=
function
()
{
Abstract
Surface
Element
.
prototype
.
getCustomMap
=
function
()
{
return
this
.
_customMap
;
};
Abstract
Overlay
Element
.
prototype
.
setCustomMap
=
function
(
customMap
)
{
Abstract
Surface
Element
.
prototype
.
setCustomMap
=
function
(
customMap
)
{
this
.
_customMap
=
customMap
;
};
module
.
exports
=
Abstract
Overlay
Element
;
module
.
exports
=
Abstract
Surface
Element
;
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