ingenta-lens
Version:
A novel way of seeing content.
29 lines (21 loc) • 799 B
JavaScript
;
var ResourceReferenceView = require('../resource_reference').View;
var InlineFormulaView = function(node, viewFactory) {
ResourceReferenceView.call(this, node, viewFactory);
$(this.el).removeClass('resource-reference');
};
InlineFormulaView.Prototype = function() {
this.createElement = function() {
var el = document.createElement('span');
return el;
};
this.render = function() {
var formula = this.node.document.get(this.node.target);
var formulaView = this.viewFactory.createView(formula);
this.el.innerHTML = formulaView.render().el.innerHTML;
return this;
};
};
InlineFormulaView.Prototype.prototype = ResourceReferenceView.prototype;
InlineFormulaView.prototype = new InlineFormulaView.Prototype();
module.exports = InlineFormulaView;