mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Rename view to model.
This commit is contained in:
parent
87862e839b
commit
be2e6f9a44
@ -63,24 +63,24 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
function toDOM(view) {
|
||||
if (view instanceof Delete) {
|
||||
function toDOM(model) {
|
||||
if (model instanceof Delete) {
|
||||
var element = document.createElement("div");
|
||||
element.classList.add("delete");
|
||||
element.appendChild(toDOM(view.before));
|
||||
element.appendChild(toDOM(model.before));
|
||||
return element;
|
||||
}
|
||||
|
||||
if (view instanceof Term) {
|
||||
if (model instanceof Term) {
|
||||
var element = document.createElement("div");
|
||||
element.classList.add("term");
|
||||
if (view.syntax instanceof Indexed) {
|
||||
for (i in view.syntax) {
|
||||
element.appendChild(toDOM(view.syntax[i]));
|
||||
if (model.syntax instanceof Indexed) {
|
||||
for (i in model.syntax) {
|
||||
element.appendChild(toDOM(model.syntax[i]));
|
||||
}
|
||||
} else if (view.syntax instanceof Keyed) {
|
||||
for (k in view.syntax) {
|
||||
element.appendChild(toDOM(view.syntax[k]));
|
||||
} else if (model.syntax instanceof Keyed) {
|
||||
for (k in model.syntax) {
|
||||
element.appendChild(toDOM(model.syntax[k]));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user