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