Skip to content
Snippets Groups Projects
Commit e7748368 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

JSDoc for Submap class

parent 4a14e94a
No related branches found
No related tags found
1 merge request!295Resolve "alternative to google maps api way of visualizing maps"
...@@ -7,8 +7,6 @@ var logger = require('../logger'); ...@@ -7,8 +7,6 @@ var logger = require('../logger');
var AbstractCustomMap = require('./AbstractCustomMap'); var AbstractCustomMap = require('./AbstractCustomMap');
var CustomMapOptions = require('./CustomMapOptions'); var CustomMapOptions = require('./CustomMapOptions');
var GoogleMapsApiCanvas = require('./canvas/GoogleMaps/GoogleMapsApiCanvas');
/** /**
* Constructor of a submap. Submaps are created on application start. But dialog * Constructor of a submap. Submaps are created on application start. But dialog
* (popup window) is initialized on demand using init function. * (popup window) is initialized on demand using init function.
...@@ -17,6 +15,8 @@ var GoogleMapsApiCanvas = require('./canvas/GoogleMaps/GoogleMapsApiCanvas'); ...@@ -17,6 +15,8 @@ var GoogleMapsApiCanvas = require('./canvas/GoogleMaps/GoogleMapsApiCanvas');
* parent CustomMap * parent CustomMap
* @param {MapModel} model * @param {MapModel} model
* *
* @constructor
* @extends AbstractCustomMap
*/ */
function Submap(customMap, model) { function Submap(customMap, model) {
this.setCustomMap(customMap); this.setCustomMap(customMap);
...@@ -39,7 +39,7 @@ Submap.prototype.constructor = Submap; ...@@ -39,7 +39,7 @@ Submap.prototype.constructor = Submap;
* This method initializes submap with gui component. Before this point submap * This method initializes submap with gui component. Before this point submap
* is created and contains data, but cannot be visualized in the browser. * is created and contains data, but cannot be visualized in the browser.
* *
* @param htmlTag * @param {HTMLElement} htmlTag
* html div tag where google map should be placed * html div tag where google map should be placed
*/ */
Submap.prototype.open = function (htmlTag) { Submap.prototype.open = function (htmlTag) {
...@@ -88,24 +88,44 @@ Submap.prototype.open = function (htmlTag) { ...@@ -88,24 +88,44 @@ Submap.prototype.open = function (htmlTag) {
}; };
/**
*
* @param {number} identifier
*/
Submap.prototype.openDataOverlay = function (identifier) { Submap.prototype.openDataOverlay = function (identifier) {
if (this.isInitialized()) { if (this.isInitialized()) {
this.getMapCanvas().setBackgroundId(identifier.toString()); this.getMapCanvas().setBackgroundId(identifier.toString());
} }
}; };
/**
*
* @returns {CustomMap}
*/
Submap.prototype.getTopMap = function () { Submap.prototype.getTopMap = function () {
return this.getCustomMap(); return this.getCustomMap();
}; };
/**
*
* @returns {CustomMap}
*/
Submap.prototype.getCustomMap = function () { Submap.prototype.getCustomMap = function () {
return this._customMap; return this._customMap;
}; };
/**
*
* @param {CustomMap} customMap
*/
Submap.prototype.setCustomMap = function (customMap) { Submap.prototype.setCustomMap = function (customMap) {
this._customMap = customMap; this._customMap = customMap;
}; };
/**
*
* @returns {Project}
*/
Submap.prototype.getProject = function () { Submap.prototype.getProject = function () {
return this.getCustomMap().getProject(); return this.getCustomMap().getProject();
}; };
......
[{"abbreviation":null,"boundaryCondition":false,"bounds":{"height":30.0,"width":80.0,"x":257.0,"y":254.0},"compartmentId":345332,"complexId":null,"constant":false,"elementId":"sa4","formerSymbols":[],"formula":null,"fullName":null,"hierarchyVisibilityLevel":"1","id":345339,"initialAmount":0.0,"initialConcentration":null,"linkedSubmodel":16731,"modelId":16728,"name":"s4","notes":"","other":{"modifications":[],"structuralState":null,"structures":{}},"references":[],"symbol":null,"synonyms":[],"transparencyLevel":"0","type":"Phenotype"}]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment