Commit 69499053 authored by csillag's avatar csillag

Generate less useless messages on and around the bridge

parent 8821246e
...@@ -154,6 +154,7 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin ...@@ -154,6 +154,7 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin
this._parse a for a in annotations when @cache[a.tag] this._parse a for a in annotations when @cache[a.tag]
# Then collect the new ones # Then collect the new ones
annotations = (this._parse a for a in annotations when not @cache[a.tag]) annotations = (this._parse a for a in annotations when not @cache[a.tag])
if annotations.length
@annotator.loadAnnotations annotations @annotator.loadAnnotations annotations
) )
...@@ -240,9 +241,11 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin ...@@ -240,9 +241,11 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin
scope: scope scope: scope
onReady: => onReady: =>
options.onConnect.call @annotator, source, origin, scope options.onConnect.call @annotator, source, origin, scope
annotations = (this._format a for t, a of @cache)
if annotations.length
channel.notify channel.notify
method: 'loadAnnotations' method: 'loadAnnotations'
params: (this._format a for t, a of @cache) params: annotations
channel = this._build options channel = this._build options
......
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