diff --git a/lib/formats/doc.js b/lib/formats/doc.js index 9f92c83..e615202 100644 --- a/lib/formats/doc.js +++ b/lib/formats/doc.js @@ -6,6 +6,7 @@ exports.public = { div.setAttribute('data-anthem-component', value.type + ':' + value.id); // if doc has data params object if (value[value.type]) { + // should be an object var data = value[value.type]; div.setAttribute('data-anthem-component-data', JSON.stringify(data)); } @@ -15,5 +16,4 @@ exports.public = { } }; -exports.private = require('./object')('doc') -; \ No newline at end of file +exports.private = require('./object')('doc'); \ No newline at end of file diff --git a/lib/formats/layout.js b/lib/formats/layout.js deleted file mode 100644 index dbb5008..0000000 --- a/lib/formats/layout.js +++ /dev/null @@ -1,28 +0,0 @@ -exports.private = { - type: 'line', - attribute: 'data-position' - }; - - exports.public = { - type: 'line', - add: function(node, value, dom) { - var container = node.ownerDocument.createElement('div'); - dom(node).wrap(container); - - switch (value) { - case 'default': - container.classList.add('default'); - break; - case 'default2': - container.classList.add('default2'); - break; - case 'default3': - container.classList.add('default3'); - break; - } - - // Return the original node, not the wrapper - return node; - } - }; - \ No newline at end of file