Author: clopes
Date: 2011-03-24 12:12:21 -0700 (Thu, 24 Mar 2011)
New Revision: 24575

Modified:
   cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js
Log:
Replaced top level "this"  by "window", in order to prevent errors on browsers 
(FF4 so far) when setting "use strict".

Modified: cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js
===================================================================
--- cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js    
2011-03-24 17:59:30 UTC (rev 24574)
+++ cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js    
2011-03-24 19:12:21 UTC (rev 24575)
@@ -34,16 +34,16 @@
 (function () {
     "use strict";
 
-    if (!this.org) {
-        this.org = {};
+    if (typeof(window['org']) === 'undefined') {
+       window['org'] = {};
     }
-    if (!this.org.cytoscapeweb) {
-        /** @namespace */
-        this.org.cytoscapeweb = {};
+    if (typeof(window.org['cytoscapeweb']) === 'undefined') {
+       /** @namespace */
+       window.org['cytoscapeweb'] = {};
     }
 
     // Create a global map to store all instances of Cytoscape Web:
-    this._cytoscapeWebInstances = { index: 0 };
+    window._cytoscapeWebInstances = { index: 0 };
 
     // ===[ Visualization 
]=========================================================================
     
@@ -126,7 +126,7 @@
      * @see org.cytoscapeweb.Visualization#draw
      * @see org.cytoscapeweb.Visualization#ready
      */
-    this.org.cytoscapeweb.Visualization = function (containerId, options) {
+    window.org.cytoscapeweb.Visualization = function (containerId, options) {
         this.containerId = containerId;
 
         if (!options) { options = {}; }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to