finishing up preliminary print dom work.
This commit is contained in:
parent
e60f96f97c
commit
19a92c4b10
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
// Exceptions
|
// Exceptions
|
||||||
|
|
||||||
(function(baselib) {
|
(function(baselib, $) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var exports = {};
|
var exports = {};
|
||||||
baselib.boxes = exports;
|
baselib.boxes = exports;
|
||||||
|
@ -43,16 +43,18 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
Box.prototype.toDomNode = function(params) {
|
Box.prototype.toDomNode = function(params) {
|
||||||
var node = document.createElement("span");
|
var node = $('<span/>');
|
||||||
if (params.getMode() === 'constructor') {
|
if (params.getMode() === 'constructor') {
|
||||||
node.appendChild(document.createTextNode("(box "));
|
node.append($('<span/>').text('(').addClass('lParen'));
|
||||||
node.appendChild(params.recur(this.val));
|
node.append($('<span/>').text('box'));
|
||||||
node.appendChild(document.createTextNode(")"));
|
node.append(" ");
|
||||||
|
node.append(params.recur(this.val));
|
||||||
|
node.append($('<span/>').text(')').addClass('rParen'));
|
||||||
} else {
|
} else {
|
||||||
node.appendChild(document.createTextNode('#&'));
|
node.append($('<span/>').text('#&'));
|
||||||
node.appendChild(params.recur(this.val));
|
node.append(params.recur(this.val));
|
||||||
}
|
}
|
||||||
return node;
|
return node.get(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
Box.prototype.equals = function(other, aUnionFind) {
|
Box.prototype.equals = function(other, aUnionFind) {
|
||||||
|
@ -101,4 +103,4 @@
|
||||||
exports.makeImmutableBox = makeImmutableBox;
|
exports.makeImmutableBox = makeImmutableBox;
|
||||||
|
|
||||||
|
|
||||||
}(this.plt.baselib));
|
}(this.plt.baselib, jQuery));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user