Closed maxkfranz closed 8 years ago
Proposal:
snap = [new] cytosnap( options )
new
options
autostart
true
snap.stop()
snap.start()
snap.shot( options, next )
format
'png' | 'jpg'
bg
full
scale
maxWidth
maxHeight
See also https://github.com/mozillascience/global-sprint-2016/issues/25
Proposal:
snap = [new] cytosnap( options )
: get a new instance (new
optional)options
autostart
: whether to automatically start on init (defaulttrue
)snap.stop()
: stops the instancesnap.start()
: manually starts the instancesnap.shot( options, next )
generate a screenshot (returns promise or can use node style callback)options
format
:'png' | 'jpg'
bg
: the background colour of the image (transparent by default).full
: whether to export the current viewport view (false, default) or the entire graph (true)scale
: This value specifies a positive number that scales the size of the resultant image.maxWidth
Specifies the scale automatically in combination with maxHeight such that the resultant image is no wider than maxWidth.maxHeight
Specifies the scale automatically in combination with maxWidth such that the resultant image is no taller than maxHeight.See also https://github.com/mozillascience/global-sprint-2016/issues/25