new AutoUI(object, widthopt, whereopt, adjusted, display)
Create a UI panel for a GrObject goes through the parameters and makes a slider for each also defines a callback for those sliders that calls the object's update function.
This does place the panel into the DOM (onto the web page)
using insertElement
in the CS559 helper library. The place
it is placed is controlled the where
parameter. By default,
it goes at the end of the DOM. However, you can pass it a DOM
element to be placed inside (or some other choices as well).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
object |
GrObject | |||
width |
number |
<optional> |
300 | |
where |
InputHelpers.WhereSpec |
<optional> |
where to place the panel in the DOM (at the end of the page by default) |
|
adjusted |
boolean | false | whether adjust the slider length according to the label length |
|
display |
string | inline-block | align type of the label and slider |
Methods
set(param, value)
Parameters:
Name | Type | Description |
---|---|---|
param |
number | string | |
value |
number |