Commit 41607799 authored by Randall Leeds's avatar Randall Leeds

Draw highlights in an animation frame

parent 9fbde23b
raf = require('raf')
Promise = global.Promise or require('es6-promise').Promise
Annotator = require('annotator')
$ = Annotator.$
......@@ -149,6 +150,7 @@ module.exports = class Guest extends Annotator
.catch((reason) -> {annotation, target, reason})
highlightRange = (range) ->
return new Promise(raf).then ->
normedRange = Annotator.Range.sniff(range).normalize(root)
return highlighter.highlightRange(normedRange)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment