From 7508ebb7943edb03c052634ae2caaf8bec370cf5 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 30 Jul 2018 16:17:43 +0200 Subject: [PATCH] description of the element is reset after reopening comment dialog --- frontend-js/src/main/js/gui/CommentDialog.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend-js/src/main/js/gui/CommentDialog.js b/frontend-js/src/main/js/gui/CommentDialog.js index 4cfd4d4cd8..0ca8766308 100644 --- a/frontend-js/src/main/js/gui/CommentDialog.js +++ b/frontend-js/src/main/js/gui/CommentDialog.js @@ -38,13 +38,13 @@ function createRow(elements) { return row; } -CommentDialog.prototype.open = function (types) { +CommentDialog.prototype.open = function (identifiedElements) { var self = this; self.setTypes([CommentDialog.GENERAL]); var promises = [CommentDialog.GENERAL]; - for (var i = 0; i < types.length; i++) { - var ie = types[i]; + for (var i = 0; i < identifiedElements.length; i++) { + var ie = identifiedElements[i]; if (ie.getType() === "ALIAS") { promises.push(self.getMap().getSubmapById(ie.getModelId()).getModel().getAliasById(ie.getId(), true)); } else if (ie.getType() === "REACTION") { @@ -182,6 +182,7 @@ CommentDialog.prototype.setTypes = function (types) { typeOptions.value = 0; this._types = types; + typeOptions.onchange(); }; CommentDialog.prototype.getTypes = function () { -- GitLab