From a5d816272e353c34d5f247a88472967ae9ecdbbe Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 12 Feb 2014 10:52:53 +0000 Subject: [PATCH] Remove unused DocumentUpdater.js file --- .../document-updater/app/DocumentUpdater.js | 181 ------------------ 1 file changed, 181 deletions(-) delete mode 100644 services/document-updater/app/DocumentUpdater.js diff --git a/services/document-updater/app/DocumentUpdater.js b/services/document-updater/app/DocumentUpdater.js deleted file mode 100644 index 11e69368dd..0000000000 --- a/services/document-updater/app/DocumentUpdater.js +++ /dev/null @@ -1,181 +0,0 @@ -(function(exports){ - Ace = require('aceserverside-sharelatex') - Range = Ace.Range - - //look at applyDeltas method - exports.applyChange = function(aceDoc, change, callback) { - var r = change.range; - var range = new Range(r.start.row, r.start.column, r.end.row, r.end.column); - if('insertText'==change.action){ - aceDoc.insert(change.range.start, change.text); - }else if('insertLines'==change.action){ - aceDoc.insertLines(change.range.start.row, change.lines); - }else if('removeText'==change.action){ - aceDoc.remove(range); - }else if('removeLines'==change.action){ - aceDoc.removeLines(range.start.row, range.end.row-1); - } - - if(typeof callback === 'function'){ - callback(null, aceDoc); - }; - } - -})(typeof exports === 'undefined'? this['documentUpdater']={}: exports); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -