[canviz] r367 committed - multiple: use contentLoaded

0 views
Skip to first unread message

can...@googlecode.com

unread,
Feb 6, 2012, 10:48:50 PM2/6/12
to canviz-...@googlegroups.com
Revision: 367
Author: ryandesign.com
Date: Mon Feb 6 19:45:31 2012
Log: multiple: use contentLoaded

http://code.google.com/p/canviz/source/detail?r=367

Modified:
/canviz/trunk/examples/multiple/index.html
/canviz/trunk/examples/multiple/scripts.js

=======================================
--- /canviz/trunk/examples/multiple/index.html Thu Jan 26 23:29:17 2012
+++ /canviz/trunk/examples/multiple/index.html Mon Feb 6 19:45:31 2012
@@ -14,6 +14,7 @@

<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
<script type="text/javascript"
src="../../build/canviz.min.js"></script>
+ <script type="text/javascript"
src="../contentloaded/contentloaded.js"></script>
<script type="text/javascript" src="scripts.js"></script>
</body>
</html>
=======================================
--- /canviz/trunk/examples/multiple/scripts.js Thu Jan 26 23:29:17 2012
+++ /canviz/trunk/examples/multiple/scripts.js Mon Feb 6 19:45:31 2012
@@ -1,3 +1,7 @@
-new Canviz('graph1', 'graph1-xdot.gv');
-new Canviz('graph2', 'graph2-xdot.gv');
-new Canviz('graph3', 'graph3-xdot.gv');
+contentLoaded(window, function() {
+ setTimeout(function() {
+ new Canviz('graph1', 'graph1-xdot.gv');
+ new Canviz('graph2', 'graph2-xdot.gv');
+ new Canviz('graph3', 'graph3-xdot.gv');
+ }, 0);
+});

Reply all
Reply to author
Forward
0 new messages