Commit e62e165e authored by Piotr Gawron's avatar Piotr Gawron
Browse files

getTopOverviewImage cannot return null

parent 907dafa3
......@@ -10,6 +10,7 @@ var OverviewDialog = require('../OverviewDialog');
var PanelControlElementType = require('../PanelControlElementType');
var Functions = require('../../Functions');
// noinspection JSUnusedLocalSymbols
var logger = require('../../logger');
/**
......@@ -187,16 +188,15 @@ TopMenu.prototype.init = function () {
commentCheckbox.onclick = function () {
ServerConnector.getSessionData(project).setShowComments(commentCheckbox.checked);
if (commentCheckbox.checked) {
$(refreshCommentButton).css("display","inline");
$(refreshCommentButton).css("display", "inline");
} else {
$(refreshCommentButton).css("display","none");
$(refreshCommentButton).css("display", "none");
}
return self.getMap().refreshComments().then(null, GuiConnector.alert);
};
refreshCommentButton.onclick = (function () {
return function () {
self.getMap().refreshComments();
return false;
return self.getMap().refreshComments();
};
})();
......@@ -207,16 +207,18 @@ TopMenu.prototype.init = function () {
};
})();
if (project.getTopOverviewImage() !== undefined && project.getTopOverviewImage() !== null) {
if (project.getTopOverviewImage() !== undefined) {
self._overviewDialog = new OverviewDialog({
customMap: self.getMap(),
configuration: self.getConfiguration(),
project: self.getProject(),
element: self.getControlElement(PanelControlElementType.OVERVIEW_DIALOG_DIV)
});
var showOverviewButton = self.getControlElement(PanelControlElementType.MENU_SHOW_OVERVIEW_BUTTON);
showOverviewButton.onclick = function () {
return self._overviewDialog.showOverview();
};
$(showOverviewButton).css("display","inline-block");
$(showOverviewButton).css("display", "inline-block");
}
if (ServerConnector.getSessionData().getShowComments()) {
......
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