From 05e67a227cabe6e2b0ddefae13570465b5de7ce4 Mon Sep 17 00:00:00 2001 From: Craig Leinoff Date: Tue, 7 Jan 2014 14:10:38 -0500 Subject: Factoring out style-applicator.js to enduser. --- lib/style-applicator.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 lib/style-applicator.js (limited to 'lib/style-applicator.js') diff --git a/lib/style-applicator.js b/lib/style-applicator.js deleted file mode 100644 index d6d909d..0000000 --- a/lib/style-applicator.js +++ /dev/null @@ -1,30 +0,0 @@ -exports.StyleApplicator = StyleApplicator; - -function StyleApplicator(options) { - styleApplicatorOptions = options.styleApplicator || {}; - - function processDocumentStyles(document) { - for (var i = 0; i < document.value.children.length; i++) { - var element = document.value.children[i]; - switch (element.type) { - case 'paragraph': - document.value.children[i] = processParagraphStyles(document.value.children[i]); - break; - } - } - return document; - } - - function processParagraphStyles(element) { - if (!element.styleName) { - if (styleApplicatorOptions.alignment && element.alignment) { - element.styleName = element.alignment+"Aligned"; - } - } - return element; - } - - return { - processDocumentStyles: processDocumentStyles - } -} \ No newline at end of file -- cgit v1.2.3