Skip to content
Snippets Groups Projects
Commit 1c1ec32d authored by Mathis Neumann's avatar Mathis Neumann
Browse files

make cola default layout and speed it up a bit

parent c9d28b29
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ export default Component.extend({
// infinite: false
// webcola options
refresh: 4, // fast animation
refresh: 5, // fast animation
avoidOverlap: true,
edgeLength: 250, // should be at least two times the diagonal of a block, blocks are 100x60, therefore around 2*116
unconstrIter: 100, // unconstrained initial layout iterations
......@@ -99,10 +99,13 @@ export default Component.extend({
resize() {
if(this._rendering) {
this._rendering.resize();
const clickTarget = this.get('_clickedElement');
if(clickTarget) { // TODO: only focus on clicked element is sidebar was not open before!
this.debug('focusing on clicked element', clickTarget);
this._rendering.center(clickTarget);
this.set('_clickedElement', null);
}
}
}
});
......@@ -49,7 +49,7 @@ export default Component.extend({
this._super(...arguments);
},
// also observe visualisation settings as resizing will apply display:none, leading to flot not rendering since it requires a width
renderPlot: on('didRender', observer('timeSeries.[]', function () {
renderPlot: on('didRender', observer('timeSeries.[]', 'visualisationEvents.isResizing', function () {
const isResizing = this.get('visualisationEvents.isResizing');
if(!this.element || isResizing) {
return;
......
......@@ -9,7 +9,7 @@ const { Service, computed, assign, observer } = Ember;
* @class VisualisationSettingsService
* @extends Ember.Service
*/
export default Service.extend({ // TODO: load and save to localstorage
export default Service.extend({
/**
* Initializes the service by loading the settings from `localStorage` (if possible)
......@@ -59,7 +59,7 @@ export default Service.extend({ // TODO: load and save to localstorage
* @property layoutAlgorithm
* @type {String}
*/
layoutAlgorithm: 'cose-bilkent',
layoutAlgorithm: 'cola',
/**
* list of supported layout algorithms
......@@ -69,9 +69,9 @@ export default Service.extend({ // TODO: load and save to localstorage
* @readOnly
*/
layoutAlgorithms: [
'cola',
'cose-bilkent',
'cose',
'cola',
'grid',
'concentric',
'breadthfirst'
......
.cytoscapeRenderingSpace {
height: 720px;
min-height: 600px;
height: auto;
max-height: 100%;
width: 100%;
left: 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment