Commit 69499053 authored by csillag's avatar csillag

Generate less useless messages on and around the bridge

parent 8821246e
...@@ -154,7 +154,8 @@ class Annotator.Plugin.Bridge extends Annotator.Plugin ...@@ -154,7 +154,8 @@ 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])
@annotator.loadAnnotations annotations if annotations.length
@annotator.loadAnnotations annotations
) )
.bind('showEditor', (ctx, annotation) => .bind('showEditor', (ctx, annotation) =>
...@@ -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
channel.notify annotations = (this._format a for t, a of @cache)
method: 'loadAnnotations' if annotations.length
params: (this._format a for t, a of @cache) channel.notify
method: 'loadAnnotations'
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