From 7bff777b077b4f457314274d0cc70e449b3d91f9 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 23 Oct 2015 19:23:58 -0400 Subject: [PATCH] Attempt to correct Diff/DOM mapping. --- prototype/UI/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/prototype/UI/index.html b/prototype/UI/index.html index f29d393b5..4ae471054 100644 --- a/prototype/UI/index.html +++ b/prototype/UI/index.html @@ -110,14 +110,15 @@ } if (model instanceof Diff) { - element = document.createElement("div"); - element.classList.add("diff"); if (model.pure != null) { + element = document.createElement("div"); + element.classList.add("diff"); element.classList.add("pure"); - element.appendChild(toDOM(model.pure)); + element.appendChild(toDOM(model.pure[stateName], stateName, source)); } else if(model.roll != null) { + element = rangeAndSyntaxToDOM(model.ranges[stateName], mapped, source, function(child) { return toDOM(child, stateName, source); }); + element.classList.add("diff"); element.classList.add("roll"); - element.appendChild(toDOM(model.roll)); } }