LGS/lib/Set.js

20 lines
747 B
JavaScript

var ESet = ESet || function(json) {
this.text = json.text || ''; // text contained in the input
this.symbol = json.symbol || ''; // symbol used for the graph
this.element = null; // DOM element this is tied to
this.parent = null; // Exercise that owns this
this.entries = json.entries || []; // Reps (equal to Page's entries
this.nodes = []; // DOM elements, equal to entries
this.lines = []; // DOM elements, equal to entries
};
ESet.prototype.getJSON = function() {
return {
text: this.text,
symbol: this.symbol,
entries: this.entries
};
};
ESet.prototype.getNumber = function() {
return parseInt(this.text);
};