      1 /*
      2     Copyright 2008-2024
      3         Matthias Ehmann,
      4         Michael Gerhaeuser,
      5         Carsten Miller,
      6         Bianca Valentin,
      7         Andreas Walter,
      8         Alfred Wassermann,
      9         Peter Wilfahrt
     10
     11     This file is part of JSXGraph.
     12
     13     JSXGraph is free software dual licensed under the GNU LGPL or MIT License.
     14
     15     You can redistribute it and/or modify it under the terms of the
     16
     17       * GNU Lesser General Public License as published by
     18         the Free Software Foundation, either version 3 of the License, or
     19         (at your option) any later version
     20       OR
     21       * MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT
     22
     23     JSXGraph is distributed in the hope that it will be useful,
     24     but WITHOUT ANY WARRANTY; without even the implied warranty of
     25     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     26     GNU Lesser General Public License for more details.
     27
     28     You should have received a copy of the GNU Lesser General Public License and
     29     the MIT License along with JSXGraph. If not, see <https://www.gnu.org/licenses/>
     30     and <https://opensource.org/licenses/MIT/>.
     31  */
     32
     33 /*global JXG: true, define: true*/
     34 /*jslint nomen: true, plusplus: true*/
     35
     36 import JXG from "../jxg.js";
     37
     38 var major = 1,
     39     minor = 10,
     40     patch = 0,
     41     add = '', // 'dev' 'beta'
     42     version = major + '.' + minor + '.' + patch + (add ? '-' + add : ''),
     43     constants;
     44
     45 constants =
     46     /** @lends JXG */ {
     47     /**
     48      * Constant: the currently used JSXGraph version.
     49      *
     50      * @name JXG.version
     51      * @type String
     52      */
     53     version: version,
     54
     55     /**
     56      * Constant: the small gray version indicator in the top left corner of every JSXGraph board (if
     57      * showCopyright is not set to false on board creation).
     58      *
     59      * @name JXG.licenseText
     60      * @type String
     61      */
     62     licenseText: "JSXGraph v" + version + " Copyright (C) see https://jsxgraph.org",
     63
     64     /**
     65      *  Constant: user coordinates relative to the coordinates system defined by the bounding box.
     66      *  @name JXG.COORDS_BY_USER
     67      *  @type Number
     68      */
     69     COORDS_BY_USER: 0x0001,
     70
     71     /**
     72      *  Constant: screen coordinates in pixel relative to the upper left corner of the div element.
     73      *  @name JXG.COORDS_BY_SCREEN
     74      *  @type Number
     75      */
     76     COORDS_BY_SCREEN: 0x0002,
     77
     78     // object types
     79     OBJECT_TYPE_ARC: 1,
     80     OBJECT_TYPE_ARROW: 2,
     81     OBJECT_TYPE_AXIS: 3,
     82     OBJECT_TYPE_AXISPOINT: 4,
     83     OBJECT_TYPE_TICKS: 5,
     84     OBJECT_TYPE_CIRCLE: 6,
     85     OBJECT_TYPE_CONIC: 7,
     86     OBJECT_TYPE_CURVE: 8,
     87     OBJECT_TYPE_GLIDER: 9,
     88     OBJECT_TYPE_IMAGE: 10,
     89     OBJECT_TYPE_LINE: 11,
     90     OBJECT_TYPE_POINT: 12,
     91     OBJECT_TYPE_SLIDER: 13,// unused
     92     OBJECT_TYPE_CAS: 14,
     93     OBJECT_TYPE_GXTCAS: 15,
     94     OBJECT_TYPE_POLYGON: 16,
     95     OBJECT_TYPE_SECTOR: 17,
     96     OBJECT_TYPE_TEXT: 18,
     97     OBJECT_TYPE_ANGLE: 19,
     98     OBJECT_TYPE_INTERSECTION: 20,
     99     OBJECT_TYPE_TURTLE: 21,
    100     OBJECT_TYPE_VECTOR: 22,
    101     OBJECT_TYPE_OPROJECT: 23,
    102     OBJECT_TYPE_GRID: 24,
    103     OBJECT_TYPE_TANGENT: 25,
    104     OBJECT_TYPE_HTMLSLIDER: 26,
    105     OBJECT_TYPE_CHECKBOX: 27,
    106     OBJECT_TYPE_INPUT: 28,
    107     OBJECT_TYPE_BUTTON: 29,
    108     OBJECT_TYPE_TRANSFORMATION: 30,
    109     OBJECT_TYPE_FOREIGNOBJECT: 31,
    110
    111     OBJECT_TYPE_VIEW3D: 32,
    112     OBJECT_TYPE_POINT3D: 33,
    113     OBJECT_TYPE_LINE3D: 34,
    114     OBJECT_TYPE_PLANE3D: 35,
    115     OBJECT_TYPE_CURVE3D: 36,
    116     OBJECT_TYPE_SURFACE3D: 37,
    117
    118     OBJECT_TYPE_MEASUREMENT: 38,
    119
    120     OBJECT_TYPE_INTERSECTION_LINE3D: 39,
    121     OBJECT_TYPE_SPHERE3D: 40,
    122     OBJECT_TYPE_CIRCLE3D: 41,
    123     OBJECT_TYPE_INTERSECTION_CIRCLE3D: 42,
    124     OBJECT_TYPE_TEXT3D: 43,
    125
    126     // IMPORTANT:
    127     // ----------
    128     // For being able to differentiate between the (sketchometry specific) SPECIAL_OBJECT_TYPEs and
    129     // (core specific) OBJECT_TYPEs, the non-sketchometry types MUST NOT be changed
    130     // to values > 100.
    131
    132     // object classes
    133     OBJECT_CLASS_POINT: 1,
    134     OBJECT_CLASS_LINE: 2,
    135     OBJECT_CLASS_CIRCLE: 3,
    136     OBJECT_CLASS_CURVE: 4,
    137     OBJECT_CLASS_AREA: 5,
    138     OBJECT_CLASS_OTHER: 6,
    139     OBJECT_CLASS_TEXT: 7,
    140     OBJECT_CLASS_3D: 8
    141 };
    142
    143 JXG.extendConstants(JXG, constants);
    144
    145 export default constants;
    146 // const COORDS_BY_SCREEN = constants.COORDS_BY_SCREEN;
    147 // export {constants as default,
    148 //         COORDS_BY_SCREEN};
    149