Commit d490da00 authored by Randall Leeds's avatar Randall Leeds

Remove unnecessary argument juggling

parent 6e2693bd
...@@ -19,7 +19,7 @@ class CrossFrameService ...@@ -19,7 +19,7 @@ class CrossFrameService
server: true server: true
new Discovery($window, options) new Discovery($window, options)
createAnnotationSync = (bridge) -> createAnnotationSync = ->
whitelist = ['target', 'document', 'uri'] whitelist = ['target', 'document', 'uri']
options = options =
formatter: (annotation) -> formatter: (annotation) ->
...@@ -41,7 +41,7 @@ class CrossFrameService ...@@ -41,7 +41,7 @@ class CrossFrameService
new AnnotationSync(bridge, options) new AnnotationSync(bridge, options)
createAnnotationUISync = (bridge, annotationSync) -> createAnnotationUISync = (annotationSync) ->
new AnnotationUISync($rootScope, $window, bridge, annotationSync, annotationUI) new AnnotationUISync($rootScope, $window, bridge, annotationSync, annotationUI)
addProvider = (channel) => addProvider = (channel) =>
...@@ -58,8 +58,8 @@ class CrossFrameService ...@@ -58,8 +58,8 @@ class CrossFrameService
discovery = createDiscovery() discovery = createDiscovery()
bridge.onConnect(addProvider) bridge.onConnect(addProvider)
annotationSync = createAnnotationSync(bridge) annotationSync = createAnnotationSync()
annotationUISync = createAnnotationUISync(bridge, annotationSync) annotationUISync = createAnnotationUISync(annotationSync)
onDiscoveryCallback = (source, origin, token) -> onDiscoveryCallback = (source, origin, token) ->
bridge.createChannel(source, origin, token) bridge.createChannel(source, origin, token)
......
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