ingenta-lens
Version:
A novel way of seeing content.
42 lines (31 loc) • 986 B
JavaScript
;
var LensNodes = require('../../../../article/nodes');
var DocumentNode = LensNodes['node'].Model;
var MathEnvironment = function(node, document) {
DocumentNode.call(this, node, document);
};
MathEnvironment.type = {
"id": "math_environment",
"parent": "content",
"properties": {
"source_id": "string",
"envType": "string",
"label": "string",
"comment": "string",
"body": ["array", "paragraph"]
}
};
MathEnvironment.Prototype = function() {
this.includeInToc = function() {
return this.properties.envType === "thmplain";
};
this.getLevel = function() {
// Note: -1 means that it is always treated as a sub-section of the last section
return -1;
};
};
MathEnvironment.Prototype.prototype = DocumentNode.prototype;
MathEnvironment.prototype = new MathEnvironment.Prototype();
MathEnvironment.prototype.constructor = MathEnvironment;
DocumentNode.defineProperties(MathEnvironment);
module.exports = MathEnvironment;