Skip to content

Commit

Permalink
parchment native scroll optimizing again
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Feb 29, 2016
1 parent e24ad04 commit c689738
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 12 deletions.
6 changes: 0 additions & 6 deletions blots/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ class Scroll extends Parchment.Scroll {
}, 0);
}

optimize(mutations = []) {
super.optimize(mutations);
this.emitter.emit(Emitter.events.SCROLL_OPTIMIZE);
}

path(index, inclusive) {
return super.path(index, inclusive).slice(1); // Exclude self
}
Expand All @@ -65,7 +60,6 @@ class Scroll extends Parchment.Scroll {
if (mutations.length > 0) {
this.emitter.emit(Emitter.events.SCROLL_UPDATE, source);
}
this.optimize(mutations, source);
}
}
Scroll.blotName = 'scroll';
Expand Down
1 change: 0 additions & 1 deletion core/emitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Emitter.events = {
MODULE_LOAD : 'module-load',
POST_EVENT : 'post-event',
PRE_EVENT : 'pre-event',
SCROLL_OPTIMIZE : 'scroll-optimize',
SCROLL_UPDATE : 'scroll-update',
SELECTION_CHANGE : 'selection-change',
TEXT_CHANGE : 'text-change'
Expand Down
3 changes: 0 additions & 3 deletions core/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ class Selection {
this.update(Emitter.sources.SILENT);
}
});
// this.emitter.on(Emitter.events.SCROLL_OPTIMIZE, () => {
// this.setRange(this.savedRange);
// });
this.update(Emitter.sources.SILENT);
}

Expand Down
2 changes: 1 addition & 1 deletion formats/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Link extends Inline {
static create(value) {
let node = super.create(value);
if (typeof value === 'string') {
this.domNode.setAttribute('href', value);
node.setAttribute('href', value);
}
return node;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"deep-equal": "~1.0.1",
"eventemitter3": "~1.1.1",
"extend": "~3.0.0",
"parchment": "quilljs/parchment.git#2517221781acb90030a78930fa32c645ac01a71b",
"parchment": "quilljs/parchment.git#f2be9e2830b6810cb3af0bb74d8d00451a06bebf",
"rich-text": "~2.1.1"
},
"devDependencies": {
Expand Down

0 comments on commit c689738

Please sign in to comment.