Commit 6dc809cc authored by Piotr Gawron's avatar Piotr Gawron
Browse files

default zoom level is not ignored when x/y is not defined

parent c6ae71f7
minerva (14.0.3) stable; urgency=medium minerva (14.0.3) stable; urgency=medium
* Bug fix: default zoom level on main map works even when x or y are
undefined (#993)
* Bug fix: sbml parser had sometimes problems with combining layout and multi * Bug fix: sbml parser had sometimes problems with combining layout and multi
packages (#966) packages (#966)
* Bug fix: parsing of CellDesigner files that contained substanceUnits could * Bug fix: parsing of CellDesigner files that contained substanceUnits could
......
...@@ -105,9 +105,8 @@ CustomMap.prototype.init = function () { ...@@ -105,9 +105,8 @@ CustomMap.prototype.init = function () {
var zoom = self.getModel().getDefaultZoomLevel(); var zoom = self.getModel().getDefaultZoomLevel();
var autoFit = false; var autoFit = false;
if (self.getServerConnector().getSessionData(self.getProject()).getCenter(self.getModel()) === undefined && if (self.getServerConnector().getSessionData(self.getProject()).getCenter(self.getModel()) === undefined &&
(x === undefined || y === undefined || zoom === undefined || (x === undefined || y === undefined || x === null || y === null) &&
x === null || y === null || zoom === null (zoom === undefined || zoom === null)) {
)) {
autoFit = true; autoFit = true;
} }
......
...@@ -547,7 +547,7 @@ MapModel.prototype.setMinZoom = function (minZoom) { ...@@ -547,7 +547,7 @@ MapModel.prototype.setMinZoom = function (minZoom) {
/** /**
* *
* @returns {number|null} * @returns {?null|number}
*/ */
MapModel.prototype.getDefaultZoomLevel = function () { MapModel.prototype.getDefaultZoomLevel = function () {
return this._defaultZoomLevel; return this._defaultZoomLevel;
...@@ -567,7 +567,7 @@ MapModel.prototype.setDefaultZoomLevel = function (defaultZoomLevel) { ...@@ -567,7 +567,7 @@ MapModel.prototype.setDefaultZoomLevel = function (defaultZoomLevel) {
/** /**
* *
* @returns {null|number} * @returns {?null|number}
*/ */
MapModel.prototype.getDefaultCenterX = function () { MapModel.prototype.getDefaultCenterX = function () {
return this._defaultCenterX; return this._defaultCenterX;
...@@ -587,7 +587,7 @@ MapModel.prototype.setDefaultCenterX = function (defaultCenterX) { ...@@ -587,7 +587,7 @@ MapModel.prototype.setDefaultCenterX = function (defaultCenterX) {
/** /**
* *
* @returns {number|null} * @returns {?null|number}
*/ */
MapModel.prototype.getDefaultCenterY = function () { MapModel.prototype.getDefaultCenterY = function () {
return this._defaultCenterY; return this._defaultCenterY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment