jsxgraph-1.4.2/000077500000000000000000000000001420114112400133325ustar00rootroot00000000000000jsxgraph-1.4.2/.eslintrc.js000066400000000000000000000011631420114112400155720ustar00rootroot00000000000000module.exports = { "env": { "browser": true, "commonjs": true, "es2021": true }, "extends": "eslint:recommended", "parserOptions": { "ecmaVersion": 13 }, "rules": { "eqeqeq": ["error", "smart"], "no-trailing-spaces": ["warn", { "ignoreComments": true }], "one-var": ["warn", "always"], "no-unused-vars": ["warn", { "vars": "local", "args": "none"}], "no-redeclare": ["error", { "builtinGlobals": false }], "no-prototype-builtins": "off", "no-empty": "off" }, "globals": { "JXG": "readonly" } }; jsxgraph-1.4.2/.gitignore000066400000000000000000000003771420114112400153310ustar00rootroot00000000000000trunk .htaccess .c9revisions build/bin/* src/require.js node_modules package-lock.json tmp/* doc/jsdoc-tk/template/static/jquery.min.js doc/jsdoc-tk/template/static/jsxgraphcore.js doc/jsdoc-tk/template/static/jsxgraph.css *.sublime-* .idea/ html-report/ jsxgraph-1.4.2/.npmignore000066400000000000000000000003071420114112400153310ustar00rootroot00000000000000# Exclude ervything * # Allow all JavaScript files from the src folder !src/* !src/*/* # Allow all JavaScript files from the distrib folder !distrib/*.js !distrib/*.ts !distrib/*.css !distrib/*/*.js jsxgraph-1.4.2/.travis.yml000066400000000000000000000002771420114112400154510ustar00rootroot00000000000000# safelist branches: only: - master language: node_js node_js: - "stable" stages: - core jobs: include: - stage: core if: branch = master script: make hint core jsxgraph-1.4.2/3rdparty/000077500000000000000000000000001420114112400151025ustar00rootroot00000000000000jsxgraph-1.4.2/CHANGELOG.md000066400000000000000000002014461420114112400151520ustar00rootroot000000000000001.4.2 ==== Improvements ------------ - Gradient fill color for points - Many improvenments to index.d.ts - Improved keyboard control - Some preparations for 3D support - Reduce thick focus box on webkit browsers Bug fixes --------- - Fix touch events for iOS < 13 - Bug fix: beautifulScientificTickLabels for numbers with negative exponents 1.4.1 ==== New features ----------- - API change: the number of digits in a text element is now set generally with the attribute `digits`. The attribute "precision" is used to decide if a pointer device is close enough to a JSXGraph element to be considered as touching the element. The old attributes `precision` for the number of digits are still working but marked as deprecated. Improvements ------------ - Update JessieCode parser - View point with keepaspectratio:true is now centered - JessieCode: points can now have names like X, Y, L. Previously, there was a conflict with function names with the same name - JessieCode: allow map functions without parameters - Refactor ca.js - API docs - index.d.ts Bug fixes --------- - Clipping: various bug fixes - Fullscreen mode - SVG screen shots - Default axis ticks in JXG.Dump.toJessie and JXG.Dump.toJavaScript. - Fix problems with board.resizeContainer() Ecosystem ------------ - npm package does not rely on the npm package canvas anymore - Add unit tests for JXG.Math.Clip - Use eslint for linting - Use terser for minifying Many thanks go to David Holmes for his contributions. 1.4.0 ==== New features ----------- - New element `boxplot` - New element `foreignobject`, shortcut `fo` - New point attribute `attractToGrid` - New method `Polygon.pnpoly()` - New method `JXG.Math.statistics.percentile` - New method `JXG.Math.Numerics.lagrangePolynomialTerm()`, also available as `JXG.Math.Numerics.lagrangePolynomial.geTerm()` - Curve / circle intersection - New color scheme, optimised for color blindness, see `JXG.palette`. Old color scheme can be restored by calling `JXG.setClassicColors()`. Improvements ------------ - Keyboard interaction - isOn method for elements with `hasInnerPoints` attribute - Much smoother two finger handling for pointer events - Intersection of curves having different Bezier degrees - API docs: many bug fixes and new examples - Jessiecode tag - Security: sanitize HTML in texts in case of JessieCode Bug fixes --------- - `zoom100()` restores the original bounding box - `Button.setText()` - Regression on glider.position - ResizeContainer conflicted with zoom level - Regular polygon - `setAngle()` - JessieCode Ecosystem ------------ - Testing with Travis is enabled again - Revoke unit tests using Karma and Jasmine - Update Makefile and package.json, less dependencies from npmjs. `make core-min` is now included in `make core`. Many thanks go to Christian Lawson-Perfect for his contributions. 1.3.2 ==== Improvements ------------ - Fullscreen mode is now also possible with an out div, see Bug fixes --------- - Fixed regression regarding full screen mode - Fixed board freeze when certain devices are hit with the palm 1.3.1 ==== New features ----------- - New method: JXG.Math.Geometry.affineRatio Improvements ------------ - Responsiveness: more stable reaction to size changes - Improved fullscreen mode in cases where the JSXGraph div does not have fixed width or height - `isOn` method covers also polygons with `hasInnerPoints:true` - API doc Bug fixes --------- - Fixed: computation of intersection between parallel and (half-)bounded line - Fixed: Intersection points between circle and line with straights off - Fixed: handling of many (uncontrolled) simultaneous pointer events - Fixed regression: points defined as transformations of other points 1.3.0 ==== New features ----------- - Responsiveness: - JSXGraph updates bounding box on resize events triggered by resizeObserver, also e.g. when changing from display:none. - New board attribute `moveTarget` allows to continue dragging outside of the board - New attribute `fontUnit` for texts - Accessibility: keyboard control of JSXGraph boards - New JSXGraph objects `curvedifference`, `curveintersection`, `curveunion` - New arrow head type 7 - JessieCode: JessieCode tags support attribute `src`. - Angle: new attribute value `radius:'auto'` - New math functions erf, erfc, erfi, ndtr, ndtri, acosh, asinh - New math functions (comparisons and logical operators as functions): lt, gt, leq, geq, eq, neq, and, or, not, xor - New method: point.isOn(element) Improvements ------------ - Arrows on curves: default arrow type 7 - Smoother animations of texts: pixel position of texts is no longer rounded - Remove internal helper points if parent object is deleted (somewhat experimental) - New default: minimizeReflow:'none' - New method `coordsOnArc` - In fixed angles (set with `setAngle`) all three points now be dragged. - Intersection with arc behaves like intersection with circle - TypeScript: improve and update `index.d.ts` - API docs Bug fixes --------- - slopeTriangle: attribute `topPoint` - Snapping of glider to curve - Magnetized points on polygons - JessieCode parser - Clipping: shapes with holes 1.2.3 ==== Improvements ------------ - `el.hideElement()`, `el.showElement()` not deprecated anymore. Same as `el.setAttribute({visible:false/true})` - Better auto positiong of labels - `board.fullUpdate()` updates size info of text elements. This is helpful for JSXGraph constructions which are initialised in a hidden parent element. When the board becomes visible, a call of board.fullUpdate() is sufficient to correct the position of the text elements. This can be triggered in an event listener (by the developer). See . Bug fixes --------- - Fix bugs in API doc - MathJax texts in fullscreen mode - Plot of conic sections of type parabola New features ----------- - KaTex support (`useKatex:true`) - Add Typescript definition file `index.d.ts` (not yet complete). Thanks to David Holmes!!! - `el.hide()`, `el.show()`, alias for `el.hideElement()`, `el.showElement()`. - Experimental: new polygon points will be deleted if polygon is deleted. In the future, this might be done in other cases, too. 1.2.2 ==== Improvements ------------ * Clipping: allow clipping of arcs and sectors, as well as rings, i.e. clipping of clipped paths * Update WordPress plug-in * Update MediaWiki plug-in * Improve plotting stability (v2 and v4) Bug fixes --------- * Clipping * camelCase for radiusPoint and anglePoint attributes * Arrow heads on curves * API docs * JessieCode procedure calls Experimental ----------- * Add cobyla port (non-linear programming) 1.2.1 ==== Bug fixes --------- * board attribute `maxFrameRate` * Fix regression in interval arithemetics * Plot version 4: take prime number as number of steps * Fix disappearing glider on natural spline 1.2.0 ==== New Features ------------ * New board attributes: - title - description - drag - showInfobox - maxFrameRate * New arrow heads * Ticks and hatches for curves * New curve type: metapost * New element: metapostspline * New math function: ratpow(base, m, n) * Chandrupatla's root finding algorithm * Interval arithmetics * New attribute: `precision` for elements for method `hasPoint` * New color function `JXG.contrast` Improvements ------------ * Experimental new curve plotting algorithm * Root finding algorithm: improved bracketing * API docs * ARIA attributes * Simulate touch event property evt.scale for pointer events * Enable setAttribute for attribute `layer` * Enable centripetal cardinal splines * JXG.Math.Clip: allow coordinate arrays as input * JXG.Math.Clip: improve stability and supported cases * Scientific notation for ticks labels * Allow floating point numbers for attributes `strokeWidth` and `size` * Add methods for sequence acceleration (math/extrapolate.js) * New helper functions in JXG.type Bug fixes --------- * Inequality element * Polygon intersection * Axis ticks, arrow heads * Projective transformations of curves * `alwaysIntersect` attribute for line intersections * Sliders with visible:false * Links in API docs * generateGaussian * Dashed curves * RDP algorithm for curves with singularities 1.1.0 ==== New Features ------------ * New JSXGraph element `polygonalchain` * New attribute `gradient` for color gradients. See API documentation for more attributes like gradient angle. * New method `JXG.Math.statistics.generateGaussian` * Slider values can be set by "up" events on the base line. Improvements ------------ * Support for MathJax 3 * Exact position of arrow heads for curves * Autoposition of labels * API documentation * Support for arrow heads on curves in canvas renderer Bug fixes --------- * Fix intersection of polygons with `polygon1.intersect(polygon2)` * Update build scripts * Remove unnecessary files from NPM repsository 1.00.0 ==== Compatibility: ------------ * Safari / iOS 13 use pointer events. * Since Safari 12, `board.renderer.screenshot()` also supports texts in Safari. * JessieCode parse errors are handed over to the user and can be catched by try {} catch (e) {} New Features ------------ * Polygon / curve clipping and boolean operation on curves is now enabled. Possible operations are intersection, union or difference of curves, polygones or circles. * New math functions: cot and acot, nthroot, cbrt, binomial. Available as JXG.Math.cot, ... * New method `JXG.math.norm`: Euclidean norm of a vector * Add board attributes "showFullscreen" and "fullscreen" * New board attribute `maxBoundingBox` * Faces for hatch marks and ticks (|><) * Create parabola given by a point and a pair of coordinate pairs. * Styling and highlighting of navigation bars with CSS * Add new parameter `delay` for CoordsElement.startAnimation() * Polar grids * New attribute `highlightSize` for arrow heads. * Reflection, mirroring of polygons * New attribute for labels `autoPosition: true/false` enables automatic positioning of labels. Improvements ------------ * screenshot and base64 dumps include images now (dumpToURI) * API documentation contains many new examples * API documetation for Chart and Legend elements * Curve plotting: massive speed improvements and plotting precision * Multi-touch rotations are much more stable for pointer events * Pointer events use different precision when using pen, mouse or touch. New events for pen: pendrag, pendown, penmove. * Highlighting and hit event for touch and pointer events * Fire `hit` event also when dragging an element * Increased precision in JXG.Math.Numerics.Jacobi * Improved zoomElements * Enable attributes for parabola subelement line * Sketch reader: copy of polygons * Sketch reader: enable reflection of circle to be circle * Massive speed-up if many elements are deleted * Use '\u26f6' unicode symbol for fullscreen * Better compromise for `_insideCanvas()` for labels. * JessieCode handling of sliders * JessieCode: Use JSXGraph method `JXG.Math.pow` for a^b. This fixes problems like plotting of (-3)^(1/3) * JessieCode: Add all JSXGraph math functions * Work on unit tests * Refactor reflection and mirrorelement * Code refactoring * Update wordpress plug-in to use jsxgraphcore.js from jsxgraph.org * Update MediaWiki plug-in * Update package.json * Improved pan / pinch-to-zoom handling Bug fixes --------- * Glider on transformed curves * Fix call of free() * Address npm security alerts * Line rotation with pointer events on Edge * Dragging of labels * Input functions for curves failed for certain JessieCode functions * Bug fix: handling of pointer events * Speed-up by preventing multiple updates of drag element. * Precision of `hasPoint` for curves * Make all examples in API docs ready for fullscreen mode * Fix a very old bug in unzip algorithm for multi-file archives * size[] for axis labels of display='internal' * Animation of gliders on lines with slope!=0 * Fix arrow head placement for type=3 * Convert attributes in subobjects to lowerCase * Fix ticks for certain axes which are neither horizontal nor vertical * Firefox multi-touch pointer events * Ticks labels in canvas renderer * Better support of JSXGraph with nodejs * Manipulating ticks visibility during `board.suspendUpdate()`` * Prevent flickering of text elements during creation * Stop using deprecated hide method in `changePointStyle` * Various changes in sketch reader for sketchometry * Geogebra reader: Fix argument order when mirroring across line 0.99.7 ==== Compatibility: ------------ Option.semicirclearc.midpoint -> Option.semicirclearc.center New Features ------------ * New elements: 'cardinalspline', 'comb': * New element: (numerical) derivative (experimental). * New element 'reflection': allows point, line, curve, polygon, circle, arc, sector and angle * New element 'mirrorelement': allows point, line, curve, polygon, circle, arc, sector and angle * New possibility to create element by supplying element + transformation: This is possible for point, line, curve, polygon, circle, arc, conics, sector and angle. * New method `Curve.moveTo()` * Add option`'auto'` for `anchorX` and `anchorY` attribute of labels * SVGRenderer.screenshot: Add parameter "ignoreTexts * New board attribute value for renderer: 'auto'. * Pointer events are enabled now for Chrome and Edge on Windows * New curve attributes `recursionDepthLow` and `recursionDepthHigh` allow user controlled plot quality * The inequality element takes now also the functiongraph element as input * New function `JXG.Math.lcm(a, b)` * New attribute 'sizeUnit` to enable the user to supply the point size in COORDS_BY_USER units Improvements ------------ * require.js support (especially in moodle) * Documentation * Enable transformation "rotate" of type `[angle, [x,y]]` * Default position of line labels * Improved `trim()` method * Improve code quality by using suggestion from jslint * Add method `Type.isTransformationOrArray()` * New default value `selection:'auto'` for arcs and sectors * Use `