Servis-Rhino 4211B Guia do Utilizador Página 215

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 214
The gauges have common properties that define their operation. Here is a list of some of the most
important ones:
value – The value of the marker in the gauge.
minimum – The lowest value in gauge.
maximum – The highest value in the gauge.
majorTickInterval – The value between major ticks.
minorTickInterval – The value between minor ticks.
minorTicksEnabled – Set to true to show minor ticks and false to hide.
interactionArea – A set of possible ways that a user can directly interact with the
guage. Possible values are:
none
indicator
guage
area
animationDuration – How long (in milliseconds) the animation should play when the
value changes. Setting a value of 0 disables.
style – Sets the CSS style properties. This includes width and height to set the size of the
gauge.
Gauges can have elements on them. These include text, scales and others. We can add an element
with the "addElement(name, element)" method, retrieve an existing element with the
"getElement(name)" method and remove existing elements with the
"removeElement(name)" method.
Notes:
It seems that when creating a gauge, it must be attached to a document DOM node when it
is created. The gauge appears to claim the DOM as its own. As such, take care when
attaching it to a container as the deletion of the gauge will delete the container. Putting it
another way, it appears that the creation of a gauge claims the node to which it is attached as
its own node.
When creating a circular gauge in a ContentPane, it seems that we need to add the gauge to
a <div> that is 4 pixels smaller in height than the content pane itself. Why this should be is
unknown but if we don't, then scrollbars appear. The following code shows us an example:
var size = domGeom.getMarginBox(myContentPane.domNode);
var node = domCostruct.create("div", {style: "height: " + (size.h-4) + "px; width: " + size.w +
"px;"});
myContentPane.set(node);
var gauge = new CircularLinearGauge({...}, node);
Page 215
Vista de página 214
1 2 ... 210 211 212 213 214 215 216 217 218 219 220 ... 297 298

Comentários a estes Manuais

Sem comentários