Skip to content

Commit

Permalink
Tile infoboxes at the end of graph update iVis-at-Bilkent/newt#354
Browse files Browse the repository at this point in the history
  • Loading branch information
kaansancak committed Jul 18, 2018
1 parent df595b8 commit 1d0b5ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/utilities/file-utilities-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ fileUtilities.loadTDFile = function(file, callback1){
reader.readAsText(file);
};

fileUtilities.loadSBGNMLText = function(textData){
fileUtilities.loadSBGNMLText = function(textData, tileInfoBoxes){
setTimeout(function () {
updateGraph(sbgnmlToJson.convert(textToXmlObject(textData)));
updateGraph(sbgnmlToJson.convert(textToXmlObject(textData)), undefined, undefined, tileInfoBoxes);
uiUtilities.endSpinner("load-file-spinner");
}, 0);

Expand Down
8 changes: 5 additions & 3 deletions src/utilities/graph-utilities-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ module.exports = function () {
return graphUtilities.compoundSizesConsidered = true;
};

graphUtilities.updateGraph = function(cyGraph, callback, isLayoutRequired) {
graphUtilities.updateGraph = function(cyGraph, callback, isLayoutRequired, tileInfoBoxes) {
console.log('cy update called');

if(isLayoutRequired === undefined){
isLayoutRequired = false;
}

$(document).trigger( "updateGraphStart", cy );
// Reset undo/redo stack and buttons when a new graph is loaded
if (options.undoable) {
Expand Down Expand Up @@ -114,7 +114,9 @@ module.exports = function () {
cy.edgeBendEditing('get').initBendPoints(cy.edges());
}

$(document).trigger( "updateGraphEnd", [cy, isLayoutRequired]);


$(document).trigger( "updateGraphEnd", [cy, (isLayoutRequired || tileInfoBoxes)]);
if (callback) callback();
};

Expand Down

0 comments on commit 1d0b5ae

Please sign in to comment.