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]
minArcLength Number Minimum length in pixels to use when drawing arcs. From 0 to 2 pixels [Default: 0]


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


Set or get the minimum arc length. The value must be between 0 and 2 [Default: 0]. Minimum arc length refers to the minimum size (in pixels) an arc will be drawn. At some scales, small features will have an arc length of a fraction of a pixel. In these cases, the arcs are hard to see. A minArcLength of 0 means no adjustments will be made.


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