Skip to content

Commit

Permalink
Allow to fetch current layout object
Browse files Browse the repository at this point in the history
  • Loading branch information
anvaka committed Mar 7, 2018
1 parent 9b4d1e5 commit 6c8506f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/View/renderer.js
Expand Up @@ -38,7 +38,7 @@ var dragndrop = require('../Input/dragndrop.js');
*
* // Layout algorithm to be used. The algorithm is expected to comply with defined
* // interface and is expected to be iterative. Renderer will use it then to calculate
* // grpaph's layout. For examples of the interface refer to Viva.Graph.Layout.forceDirected()
* // graph's layout. For examples of the interface refer to Viva.Graph.Layout.forceDirected()
* layout : Viva.Graph.Layout.forceDirected(),
*
* // Directs renderer to display links. Usually rendering links is the slowest part of this
Expand Down Expand Up @@ -158,6 +158,13 @@ function renderer(graph, settings) {
getGraphics: function() {
return graphics;
},

/**
* Gets current layout.
*/
getLayout: function() {
return layout;
},

/**
* Removes this renderer and deallocates all resources/timers
Expand Down

0 comments on commit 6c8506f

Please sign in to comment.