Class: Settings

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 - -

Attributes

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]

Examples

new Settings(viewer, options)

Initialize Settings.

Name Type Description
viewer Viewer

The viewer

options Object

Attributes used to initialize settings.

Members

arrowHeadLengthNumber

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].

backgroundColorColor

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.

formatString

Get or set the map format: circular, linear

geneticCodeNumber

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

initialMapThicknessProportionBoolean

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.

maxMapThicknessProportionBoolean

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

showShadingBoolean

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

Methods

toJSON()

Returns JSON representing the object

toString(){String}

Return the class name as a string.

Returns:
Type Description
String
  • 'Settings'

update(attributes)

Update settings attributes. See updating records for details.

Name Type Description
attributes Object

Object describing the properties to change