diff options
author | Phil Hughes <me@iamphill.com> | 2017-11-28 17:43:47 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-11-28 17:43:47 +0300 |
commit | 061be86e052d42a66fa82dd09eab990cf5cf0986 (patch) | |
tree | f310ff3bcb63ea9f1ee58537d7f87a39edb18a36 /app/assets | |
parent | fd818194f157b4facd88ec829d5b43929c465de5 (diff) |
added specs
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/repo/lib/common/model.js | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/app/assets/javascripts/repo/lib/common/model.js b/app/assets/javascripts/repo/lib/common/model.js index fd6f41f87b1..23c4811e6c0 100644 --- a/app/assets/javascripts/repo/lib/common/model.js +++ b/app/assets/javascripts/repo/lib/common/model.js @@ -28,31 +28,10 @@ export default class Model { return this.model.uri.toString(); } - get originalUrl() { - return this.originalModel.uri.toString(); - } - get path() { return this.file.path; } - get diffModel() { - return Model.getDiffModel(this.model); - } - - get originalDiffModel() { - return Model.getDiffModel(this.originalModel); - } - - static getDiffModel(model) { - return { - url: model.uri.toString(), - versionId: model.getVersionId(), - lines: model.getLinesContent(), - EOL: '\n', - }; - } - getModel() { return this.model; } @@ -63,7 +42,7 @@ export default class Model { onChange(cb) { this.events.set( - this.file.path, + this.path, this.disposable.add( this.model.onDidChangeContent(e => cb(this.model, e)), ), |