Skip to content

"momentGen"

mkraska edited this page Jul 8, 2023 · 5 revisions

[ "momentGen", "name", [x,y] ]

Interactive moment generator. It consists of an input field for the label and a moment prototype, which can be dragged to produce new moments. Moments can be deleted by dragging one of their control points outside of the canvas.

  • "name" initial value for the label input field.
  • [x,y] anchor point of the input field (left, vertically centered)

The input field automatically corrects non-valid names (in terms of STACK). Example: Fax -> F_ax.

Example

image

[
  [ "grid", "x","y", -5,5,-4,5, 50, [10,10], [0,0] ],
  [ "momentGen", "name", [2,2] ]
]

Tryout Space

In order to try code snippets in jsfiddle,

  1. copy the code from the wiki page to the clipboard
  2. follow the link for the JSXGraph version you want to try
  3. Replace the code in the HTML section (contents of <p hidden id="init">) with the content of the clipboard
Clone this wiki locally