Skip to content

Commit

Permalink
borders for tabs and other minor details #715
Browse files Browse the repository at this point in the history
  • Loading branch information
umut-er committed Jun 26, 2024
1 parent 5b5d0aa commit 2eb448f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 24 deletions.
20 changes: 7 additions & 13 deletions app/css/chise.css
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,6 @@ hr.inspector-divider {
padding: 3px;
}

.element-palette div {
/*width: 36px;*/
/*height: 30px;*/
}

.selected-mode.inactive-palette-element {
border-style: dotted;
border-width: 1px;
Expand All @@ -718,9 +713,12 @@ hr.inspector-divider {

.chise-network-tab {
margin-right: 2px;
border-radius: 0 0 8px 8px !important;
border-radius: 0 0 8px 2px !important;
background: transparent !important;
border-top: 0px !important;
border: 1px solid #777;
border-left-width: 0px !important;
box-shadow: 1px 1px 2px #777;
}

.map-tab-type {
Expand All @@ -739,9 +737,11 @@ hr.inspector-divider {
.chise-network-tab a {
color: #555;
padding-top: 10px !important;
padding-bottom: 11px !important;
padding-bottom: 12px !important;
padding-left: 5px !important;
padding-right: 5px !important;
border-bottom-right-radius: 8px !important;
border-bottom-left-radius: 2px !important;
font-size: 11px;
width: 86px;
white-space: nowrap;
Expand Down Expand Up @@ -774,7 +774,6 @@ hr.inspector-divider {
border-width: 1px !important;
border-radius: calc !important;
font-size: 12px;
align: center;
}

#sbgn-toolbar img {
Expand Down Expand Up @@ -832,11 +831,6 @@ img#template-reversible-output-add-button:hover {
width: 300px;
}

.paletteCont
{

}

.paletteCol {
position: relative;
display: inline-block;
Expand Down
3 changes: 1 addition & 2 deletions app/js/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,7 @@ module.exports = function() {
appUtilities.setScratch(cy, 'currentGeneralProperties', currentGeneralProperties);

var activeChiseId = appUtilities.networkIdsStack[appUtilities.networkIdsStack.length-1];
$('#' + appUtilities.getMapTypeDivId(activeChiseId)).text(appUtilities.getDisplayMapName(chiseInstance.getMapType()));
console.log("Finished loading " + appUtilities.getDisplayMapName(chiseInstance.getMapType()));
$('#' + appUtilities.getMapTypeDivId(activeChiseId)).text(appUtilities.getTabLabelName(chiseInstance.getMapType()));

cy.fit( cy.elements(":visible"), 20 );
});
Expand Down
14 changes: 6 additions & 8 deletions app/js/app-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ appUtilities.mapTypesToViewableText = {
'AF': 'AF',
'SIF': 'SIF',
'SBML': 'SBML',
'HybridSbgn' : 'Hybrid (PD,AF)' ,
'HybridAny' : 'Hybrid (PD,AF,SIF, SBML)'
'HybridSbgn' : 'PD+AF' ,
'HybridAny' : 'PD+AF+SIF+SBML'
};
// Set a single property on scratchpad of an element or the core
appUtilities.setScratch = function (cyOrEle, name, val) {
Expand Down Expand Up @@ -345,12 +345,10 @@ appUtilities.adjustVisibilityOfNetworkTabs = function () {

// returns the display name of map types to align with issue #715.
// see https://github.com/iVis-at-Bilkent/newt/issues/715
appUtilities.getDisplayMapName = function(mapName) {
if(mapName == "HybridSbgn")
return "PD+AF";
else if(mapName == "HybridAny")
appUtilities.getTabLabelName = function(mapName) {
if(mapName == "HybridAny")
return "ALL";
return mapName;
return appUtilities.mapTypesToViewableText[mapName];
}

// creates a new network and returns the new chise.js instance that is created for this network
Expand Down Expand Up @@ -489,7 +487,7 @@ appUtilities.createNewNetwork = function (networkName, networkDescription) {

// update the map type descriptor
var mapType = appUtilities.getActiveChiseInstance().getMapType();
$('#' + mapTypeDivId).text(appUtilities.getDisplayMapName(mapType));
$('#' + mapTypeDivId).text(appUtilities.getTabLabelName(mapType));

// return the new instance
return newInst;
Expand Down
2 changes: 1 addition & 1 deletion app/js/backbone-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ var MapTabGeneralPanel = GeneralPropertiesParentView.extend({
var callback = function () {
$("#map-type").val(chiseInstance.getMapType());
var activeChiseId = appUtilities.networkIdsStack[appUtilities.networkIdsStack.length-1];
$('#' + appUtilities.getMapTypeDivId(activeChiseId)).text(appUtilities.getDisplayMapName(chiseInstance.getMapType()));
$('#' + appUtilities.getMapTypeDivId(activeChiseId)).text(appUtilities.getTabLabelName(chiseInstance.getMapType()));
};
// use active cy instance
var cy = appUtilities.getActiveCy();
Expand Down

0 comments on commit 2eb448f

Please sign in to comment.