1 /*
  2     Copyright 2008,2009
  3         Matthias Ehmann,
  4         Michael Gerhaeuser,
  5         Carsten Miller,
  6         Bianca Valentin,
  7         Alfred Wassermann,
  8         Peter Wilfahrt
  9 
 10     This file is part of JSXGraph.
 11 
 12     JSXGraph is free software: you can redistribute it and/or modify
 13     it under the terms of the GNU Lesser General Public License as published by
 14     the Free Software Foundation, either version 3 of the License, or
 15     (at your option) any later version.
 16 
 17     JSXGraph is distributed in the hope that it will be useful,
 18     but WITHOUT ANY WARRANTY; without even the implied warranty of
 19     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 20     GNU Lesser General Public License for more details.
 21 
 22     You should have received a copy of the GNU Lesser General Public License
 23     along with JSXGraph.  If not, see <http://www.gnu.org/licenses/>.
 24 
 25 */
 26 
 27 /**
 28  * JSXGraph namespace. Holds all classes, objects, functions and variables belonging to JSXGraph
 29  * to reduce the risc of interfering with other JavaScript code.
 30  * @namespace
 31  */
 32 var JXG = {};
 33 (function(){
 34     var i, s;
 35     //JXG.useMinify = true;
 36     JXG.countDrawings = 0;
 37     JXG.countTime = 0;
 38     JXG.require = function(libraryName) {};
 39     JXG.rendererFiles = {};
 40     JXG.rendererFiles['svg'] = 'SVGRenderer';
 41     JXG.rendererFiles['vml'] = 'VMLRenderer';
 42     JXG.rendererFiles['canvas'] = 'CanvasRenderer';
 43     JXG.baseFiles = null;
 44     // this maybe required by additional software/extensions and/or future renderers
 45     JXG.requirePath = '';
 46     if (typeof document !== 'undefined') {
 47         for (i=0;i<document.getElementsByTagName("script").length;i++) {
 48             s = document.getElementsByTagName("script")[i];
 49             if (s.src && s.src.match(/loadjsxgraphInOneFile\.js(\?.*)?$/)) {
 50                 JXG.requirePath = s.src.replace(/loadjsxgraphInOneFile\.js(\?.*)?$/,'');
 51             }
 52         }
 53     }
 54 JXG.serverBase = JXG.requirePath + 'server/';
 55 
 56 if (typeof module !== 'undefined') {
 57     module.exports = JXG;
 58 }
 59 
 60 })();
 61