Skip to content
Snippets Groups Projects

Resolve "full reaction returned by API should have info about reactants/products/modifiers"

Merged Piotr Gawron requested to merge 111-full-reaction-with-aliases into master
3 files
+ 61
25
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -108,6 +108,7 @@ Reaction.prototype.update = function(javaObject) {
this.setDescription(javaObject.notes);
this.setOther(javaObject.other);
this.setReferences(javaObject.references);
this.setType(javaObject.type);
if (javaObject.reactants !== "") {
this.setReactants(javaObject.reactants.split(","));
@@ -267,6 +268,14 @@ Reaction.prototype.getModifiers = function() {
return this._modifiers;
};
Reaction.prototype.setType = function(type) {
this._type = type;
};
Reaction.prototype.getType = function() {
return this._type;
};
Reaction.prototype.getOther = function(type) {
if (this._other !== undefined) {
return this._other[type];
@@ -293,4 +302,4 @@ Reaction.prototype.setHierarchyVisibilityLevel = function(hierarchyVisibilityLev
this._hierarchyVisibilityLevel = hierarchyVisibilityLevel;
};
module.exports = Reaction;
module.exports = Reaction;
\ No newline at end of file
Loading