Commit 3c7ca3db authored by Piotr Gawron's avatar Piotr Gawron
Browse files

possibility to show reaction name

parent 8d14aeb5
Pipeline #47263 passed with stage
in 19 minutes and 35 seconds
minerva (16.1.0~alpha.0) stable; urgency=medium
* Small improvement: possibility to show reaction name (#1355)
* Small improvement: There is possibility to provide custom CSS style (#1017)
* Small improvement: API provides information about modifier type (#1085)
* Small improvement: map file for JavaScript is properly referenced (#1545)
......
......@@ -52,6 +52,7 @@ var ConfigurationType = {
SHOW_REACTION_SYNONYMS: "SHOW_REACTION_SYNONYMS",
SHOW_REACTION_TITLE: "SHOW_REACTION_TITLE",
SHOW_REACTION_TYPE: "SHOW_REACTION_TYPE",
SHOW_REACTION_NAME: "SHOW_REACTION_NAME",
SHOW_REACTION_UPPER_BOUND: "SHOW_REACTION_UPPER_BOUND",
SEARCH_DISTANCE: "SEARCH_DISTANCE",
SEARCH_RESULT_NUMBER: "SEARCH_RESULT_NUMBER",
......
......@@ -676,6 +676,10 @@ GuiUtils.prototype.createReactionElement = function (params) {
div.appendChild(self.createNewLine());
}
div.appendChild(self.createParamLine({
label: "Name: ",
value: reaction.getName(), className: self._configurationOptionToClassName(ConfigurationType.SHOW_REACTION_NAME)
}));
div.appendChild(self.createParamLine({
label: "Type: ",
value: reaction.getType(), className: self._configurationOptionToClassName(ConfigurationType.SHOW_REACTION_TYPE)
......
......@@ -126,6 +126,7 @@ Reaction.prototype.update = function (javaObject) {
return;
}
this.setReactionId(javaObject.reactionId);
this.setName(javaObject.name);
this.setSymbol(javaObject.symbol);
this.setAbbreviation(javaObject.abbreviation);
this.setFormula(javaObject.formula);
......@@ -213,6 +214,22 @@ Reaction.prototype.setReactionId = function (reactionId) {
this._reactionId = reactionId;
};
/**
*
* @param {string} name
*/
Reaction.prototype.setName = function (name) {
this._name = name;
};
/**
*
* @return {string}
*/
Reaction.prototype.getName = function () {
return this._name;
};
/**
*
* @returns {string}
......
......@@ -267,6 +267,9 @@ public enum ConfigurationElementType {
SHOW_REACTION_TITLE("Show reaction title", "true", ConfigurationElementEditType.BOOLEAN, false,
ConfigurationElementTypeGroup.SEARCH_VISIBLE_PARAMETERS),
SHOW_REACTION_NAME("Show reaction name", "false", ConfigurationElementEditType.BOOLEAN, false,
ConfigurationElementTypeGroup.SEARCH_VISIBLE_PARAMETERS),
SHOW_REACTION_LINKED_SUBMAP("Show linked submap for reaction", "true", ConfigurationElementEditType.BOOLEAN, false,
ConfigurationElementTypeGroup.SEARCH_VISIBLE_PARAMETERS),
......
......@@ -256,6 +256,7 @@ public class ReactionsController extends BaseController {
result.add("reactionId");
result.add("modelId");
result.add("type");
result.add("name");
result.add("lines");
result.add("kineticLaw");
result.add("centerPoint");
......
......@@ -239,6 +239,10 @@ public class MapControllerIntegrationTest extends ControllerIntegrationTest {
.description("reaction identifier taken from source file")
.type(JsonFieldType.STRING)
.optional(),
fieldWithPath("[].name")
.description("reaction name")
.type(JsonFieldType.STRING)
.optional(),
fieldWithPath("[].modelId")
.description("map identifier")
.type(JsonFieldType.NUMBER)
......
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