projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Export a few more symbols
[dygraphs.git]
/
src
/
extras
/
synchronizer.js
diff --git
a/src/extras/synchronizer.js
b/src/extras/synchronizer.js
index
78efbcb
..
bf5b6f3
100644
(file)
--- a/
src/extras/synchronizer.js
+++ b/
src/extras/synchronizer.js
@@
-35,7
+35,14
@@
/* global Dygraph:false */
'use strict';
/* global Dygraph:false */
'use strict';
-Dygraph.synchronize = function(/* dygraphs..., opts */) {
+var Dygraph;
+if (window.Dygraph) {
+ Dygraph = window.Dygraph;
+} else if (typeof(module) !== 'undefined') {
+ Dygraph = require('../dygraph');
+}
+
+var synchronize = function(/* dygraphs..., opts */) {
if (arguments.length === 0) {
throw 'Invalid invocation of Dygraph.synchronize(). Need >= 1 argument.';
}
if (arguments.length === 0) {
throw 'Invalid invocation of Dygraph.synchronize(). Need >= 1 argument.';
}
@@
-170,7
+177,7
@@
function attachZoomHandlers(gs, syncOpts, prevCallbacks) {
}
block = false;
}
}
block = false;
}
- },
fals
e /* no need to redraw */);
+ },
tru
e /* no need to redraw */);
}
}
}
}
@@
-213,8
+220,10
@@
function attachSelectionHandlers(gs, prevCallbacks) {
}
block = false;
}
}
block = false;
}
- });
+ }
, true /* no need to redraw */
);
}
}
}
}
+Dygraph.synchronize = synchronize;
+
})();
})();