diff --git a/frontend-js/src/main/js/gui/MapContextMenu.js b/frontend-js/src/main/js/gui/MapContextMenu.js index 68008e675912b5f07f38d863b6a7f652a885747e..d2caf8181ec57f9f7ab91d8389d0252b82fab56a 100644 --- a/frontend-js/src/main/js/gui/MapContextMenu.js +++ b/frontend-js/src/main/js/gui/MapContextMenu.js @@ -26,7 +26,13 @@ MapContextMenu.prototype._createMapContextMenuGui = function() { self.addOption("Select mode", function() { return self.getMap().turnOnOffDrawing(); }); +}; +MapContextMenu.prototype.init = function() { + var self = this; + return self.createExportAsImageSubmenu().then(function(submenu){ + self.addOption(submenu); + }); }; module.exports = MapContextMenu; diff --git a/frontend-js/src/test/js/gui/MapContextMentu-test.js b/frontend-js/src/test/js/gui/MapContextMentu-test.js index 0ff69f16bd75de3d33450864a12af1121493a46d..5b1c49f7849236570b97a5a0574609bae93793ec 100644 --- a/frontend-js/src/test/js/gui/MapContextMentu-test.js +++ b/frontend-js/src/test/js/gui/MapContextMentu-test.js @@ -30,6 +30,16 @@ describe('MapContextMenu', function() { assert.equal(logger.getWarnings().length, 0); }); + it('init', function() { + var map = helper.createCustomMap(); + + var menu = new MapContextMenu({ + element : testDiv, + customMap : map + }); + return menu.init(); + }); + it('open comment dialog', function() { var map; return ServerConnector.getProject().then(function(project) {