v1.12.0

Option handling in version 0.90

Posted on June 8, 2011 by Alfred Wassermann

The upcoming version 0.90 is a major rewrite of the complete JSXGraph codebase. Since there are so many changes, we decided to reflect this leap forward already in the version numbering and jump directly from version 0.82 to version 0.90.

The main area of changes is the object JXG.Options. Starting with version 0.90 by changing this object (located in Options.js) it is possible to configure the complete default visual appearance of JSXGraph applications. If you want to override some of the default options but want to (or have to when you use the minified edition) keep the original JXG.Options you can do so by copying the changed options:

1
2
3
4
5
6
JXG.Options = JXG.deepCopy(JXG.Options, {
    showNavigation: false,
    point: {
        face: 'x'
    }
}

Further, the setting of attributes with the board.create() method is much more powerful than before (and much faster). It is now possible to set attributes for compositions (elements built with several other elements) directly, e.g. use

1
2
3
4
5
6
7
8
9
board.create('circumcircle', [p1, p2, p3], {
    strokeColor: 'red',
    point: {
        face: 'x',
        visible: true,
        name: null,
        withLabel: true
    }
});

to create a circumcircle and make the center visible, x-faced and labeled. See Options.js for the sub attributes.

Unfortunately, for developer of JSXGraph applications this release cuts off some deprecated features.

1
    JXG.Options.axis.ticks.majorHeight = 10;

before calling JXG.JSXGraph.initBoard().

To all posts