Fix display of nested facts

This commit is contained in:
Joe Fiorini
2015-06-08 09:37:19 -04:00
parent cb17209c04
commit cf04337712
3 changed files with 5 additions and 6 deletions

View File

@@ -9,7 +9,9 @@ import compareFlatFacts from './compare-facts/flat';
export function compareFacts(module, facts) { export function compareFacts(module, facts) {
if (module.displayType === 'nested') { if (module.displayType === 'nested') {
return compareNestedFacts(facts); return { factData: compareNestedFacts(facts),
isNestedDisplay: true
};
} else { } else {
// For flat structures we compare left-to-right, then right-to-left to // For flat structures we compare left-to-right, then right-to-left to
// make sure we get a good comparison between both hosts // make sure we get a good comparison between both hosts

View File

@@ -127,8 +127,8 @@ export function formatFacts(diffedResults) {
} }
export function findFacts(factData) { export function findFacts(factData) {
var rightData = factData[0]; var rightData = factData[0].facts;
var leftData = factData[1]; var leftData = factData[1].facts;
function factObject(keyPath, key, leftValue, rightValue) { function factObject(keyPath, key, leftValue, rightValue) {
var obj = var obj =

View File

@@ -79,9 +79,6 @@ function controller($rootScope,
// arrays in index 1 // arrays in index 1
// //
// Save the position of the data so we
// don't lose it later
var wrappedFacts = var wrappedFacts =
facts.map(function(facts, index) { facts.map(function(facts, index) {
return { position: index === 0 ? 'left' : 'right', return { position: index === 0 ? 'left' : 'right',