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 * @fileoverview In this file some simple element types like 28 * numerics, distance etc. are defined. 29 * @author graphjs 30 * @version 0.1 31 */ 32 33 /** 34 * Creates a new element of type numeric. The numeric element is a simple element which just stores a (dynamic) numeric value. 35 * @param {JXG.Board} board The board the numeric value is assigned to. 36 * @param {numeric,function} parents A numeric value or a function returning a numeric value. 37 * @param {Object} attributs Object containing properties for the element such as stroke-color and visibility. See @see JXG.GeometryElement#setProperty 38 * @type numeric,function 39 * @return Reference to the given function or value of the given numeric. 40 */ 41 JXG.createNumeric = function(board, parents, attributes) { 42 return parents; 43 }; 44 45 JXG.JSXGraph.registerElement('numeric', JXG.createNumeric);