Desmos API v0.9 released

88 views
Skip to first unread message

desmos-api-announce

unread,
Jun 19, 2017, 2:46:49 PM6/19/17
to desmos-api-announce

Desmos is very happy to announce the release of version 0.9 of the Desmos API.

 

 

This release is part of our scheduled release cycle, and we recommend all users upgrade to this version. Benefits of upgrading include:

 

  • remaining consistent with what students see on high-stakes tests in states where Desmos is embedded in the test platform.

  • offering an experience for students in your product similar to the one at desmos.com.

  • ensuring the best interaction with the latest browsers and platforms.

 

We will help all of our partners upgrade to version 0.9 in a timely fashion. Please email Eleanor Dorfman (ele...@desmos.com) with any questions!

 

New Features:

 

In version 0.9 we are introducing new features to give you finer control over more aspects of the calculators for both you and your users.

 

  1. Points in the graphing calculator may now include user-defined labels, the contents and visibility of which can be controlled through the .setExpression() method. By leveraging HelperExpressions, it is possible to create interesting dynamic labels.

 

  1. The basic calculators now include observable events that let you listen for state changes the same way you can in the graphing calculator, and the graphing calculator now fires an event whenever the user has cleared or reset a graph to its default state.

 

  1. It is possible to control more properties of individual expressions, including marking them secret and setting the drawing styles of points and curves.

 

  1. You can give users the ability to import any graph saved on desmos.com into your application by simply pasting a valid URL into the expressions list.

 

  1. Uploaded images may be intercepted before they are inserted into the graphing calculator, which gives you much more flexibility to define custom upload behavior, and potentially dramatically reduce the size of your persisted graph states.

 

 

Code Update:

 

Note that there has been an important change to one of the constructor options.

 

  1. The graphing calculator’s singleVariableSolutions constructor option now defaults to false. This means that, by default, the calculator will no longer show the evaluation text containing solutions to linear and quadratic equations of a single variable. If you want to preserve this behavior in v0.9, you must explicitly set singleVariableSolutions to true in the constructor. Note, however, that this option is now deprecated and solving of single variable equations will no longer be supported in future versions of the API.

 

  1. All of the calculators now respond to resizing of their container elements automatically, regardless of how a container’s dimensions are changed (either through a window resize event or via JavaScript). It is no longer ever necessary to call .resize() — even when the calculator is instantiated outside of the DOM and inserted later — unless you explicitly disable automatic resizing with the {autosize: false} constructor option.

 

  1. The calculators have each been given a destructor method. You should call .destroy() when you remove a calculator instance from the DOM, which will allow us to unbind event listeners and free resources for garbage collection.

 

  1. We have taken steps to reduce the size of graph states returned from GraphingCalculator.getState() in order to save memory and bandwidth when persisting states to a database or passing them over a network connection. Although graph states have always been intended to be treated as opaque values, you should audit your code to ensure that you are not depending on any particular properties being present in saved states.

 

  1. HelperExpressions are no longer plotted under any circumstances. It used to be possible to plot an expression that did not show up in the expressions list by creating a HelperExpression with certain types of latex properties. That was never the intended or documented behavior; it was a bug that is now fixed. If you want to observe changes in a LaTeX value, use a HelperExpression. If you want to create an expression that does not appear in the expressions list, use .setExpression() and set the expression’s secret property to true.

Reply all
Reply to author
Forward
0 new messages