Aspect ratio
A property of type KontrastAspectRatio
is very similar to
a number property, as properties of this
type are used to specify the aspect ratio (width divided by height) of
graphs. Similar to the number property, mathematical expression
strings are numerically evaluated, such as '16 / 9'
. If
you specify the string 'arbitrary'
, Kontrast determines a
suitable aspect ratio automatically. In this case, the aspect ratio is
derived from the size of the figure and the placement of other graphs.
Interface
Functions
-
assign(value: number | string)
Assign a new value. -
addEventListener(eventName: string, callback: function)
Registers the callback function as an event listener for the specified event name. -
clearEventListener(eventName: string)
Remove all event listener callbacks associated with the event name.
Properties
-
type
:string
The read-only string 'KontrastAspectRatio'.
-
defaultValue
:string
|number
A read-only string or number that contains the default aspect ratio of the specific property.
-
value
:string
|number
The current value (as a JavaScript string or number, depending on the way the value has been assigned).
Events
-
change
, callback:function () { … }
Event that fires whenever the value is changed.