Class: Settings


The CGView Settings contain general settings for the viewer.

Action and Events

Action Viewer Method Settings Method Event
Update - update() settings-update
Read settings - -


Attribute Type Description
format String The layout format of the map: circular, linear [Default: circular]
backgroundColor String A string describing the background color of the map [Default: 'white']. See Color for details.
showShading Boolean Should a shading effect be drawn on the features [Default: true]
arrowHeadLength Number Length of feature arrowheads as a proportion of the feature thickness. From 0 (no arrowhead) to 1 (arrowhead as long on the feature is thick) [Default: 0.3]
initialMapThicknessProportion Number Proportion of canvas size to use for drawing map tracks at a zoomFactor of 1 [Default: 0.1]
maxMapThicknessProportion Number Proportion of canvas size to use for drawing map tracks at max zoom level [Default: 0.5]


new Settings(viewer, options)

Initialize Settings.

Name Type Description
viewer Viewer

The viewer

options Object

Attributes used to initialize settings.



Set or get the arrow head length as a fraction of the slot width. The value must be between 0 and 1 [Default: 0.3].


Get or set the backgroundColor. When setting the color, a string representing the color or a Color object can be used. For details see Color.


Get or set the map format: circular, linear


Get or set the genetic code used for translation. This genetic code will be used unless a feature has an overriding genetic code. Default: 11


Get or set the initial width/thickness of the map as a proportion of the canvas dimension (Circular: minDimension; Linear: height). The width will grow/shrink with the zoomFactor (Default: 0.1). This value will be ignored if the maxMapThicknessProportion value is smaller.


Get or set the maximum width/thickness of the map as a proportion of the canvas width or height (Default: 0.5).


Get or set whether arrows and other components whould be draw with shading (Default: true).



Returns JSON representing the object


Return the class name as a string.

Type Description
  • 'Settings'


Update settings attributes. See updating records for details.

Name Type Description
attributes Object

Object describing the properties to change