Skip to content

Commit

Permalink
Fix bug sourced from merge
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanbalci committed Sep 3, 2024
1 parent 8a2153b commit 7b0c7ca
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions app/js/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,33 +648,6 @@ module.exports = function() {
}
});

$("#gpml-file-input").change(function () {

var chiseInstance = appUtilities.getActiveChiseInstance();
var cy = appUtilities.getActiveCy();
if ($(this).val() != "") {
var file = this.files[0];
appUtilities.setFileContent(file.name);
chiseInstance.loadGpml(file, success = function(data){
if (cy.elements().length !== 0) {
promptConfirmationView.render(function () {
chiseInstance.loadSBGNMLText(data.message, false, file.name, cy);
});
}
else {
chiseInstance.loadSBGNMLText(data.message, false, file.name, cy);
}
},
error = function(data){
promptFileConversionErrorView.render();
document.getElementById("file-conversion-error-message").innerText = "Conversion service is not available!";

});

$(this).val("");
}
});

$("#simple-af-file-input").change(function () {
var chiseInstance = appUtilities.getActiveChiseInstance();

Expand Down Expand Up @@ -818,18 +791,6 @@ module.exports = function() {
// clear urlParams from scratch
appUtilities.setScratch(cy, 'urlParams', undefined);


// get applyLayout value before map properties are filtered, apply layout
// isn't really a map property so its not added to sbgnviz
// validMapProperties
const applyLayout = urlParams.applyLayoutOnURL === "true";
const fromURL = urlParams.url !== undefined;

if (urlParams.compoundPadding) {
const compoundPadding = urlParams.compoundPadding;
chiseInstance.setCompoundPadding(Number(compoundPadding));
}

// filter map properties from the url parameters

// get applyLayout value before map properties are filtered, apply layout
Expand Down Expand Up @@ -868,24 +829,6 @@ module.exports = function() {
appUtilities.applyMapColorScheme(urlParams.mapColorScheme, currentGeneralProperties.mapColorSchemeStyle, appUtilities.colorSchemeInspectorView);
}

if (fromURL && applyLayout) {
let currentLayoutProperties = appUtilities.getScratch(cy, 'currentLayoutProperties');

// Below is copied from sbgnviz.graphUtilities.updateGraph
let preferences = {};
if(cy.nodes().length > 3000 || cy.edges().length > 3000) {
preferences.quality = "draft";
}
preferences.animate = false;
preferences.randomize = true;
preferences = $.extend({}, currentLayoutProperties, preferences);
layoutPropertiesView.applyLayout(preferences);
}

if (urlParams.mapColorScheme) {
appUtilities.applyMapColorScheme(urlParams.mapColorScheme, currentGeneralProperties.mapColorSchemeStyle, appUtilities.colorSchemeInspectorView);
}

// merge the map properties coming from url into
// the map properties read from file
for ( var prop in mapPropsFromUrl ) {
Expand Down

0 comments on commit 7b0c7ca

Please sign in to comment.