Skip to content

Commit d4a6548

Browse files
committed
update visualization layout and version
1 parent 7ed4248 commit d4a6548

File tree

6 files changed

+32
-24
lines changed

6 files changed

+32
-24
lines changed

js/lib/cytoscape.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.cytoscape-widget {
2-
height: 500px;
2+
height: 700px;
33
background: #FFFFFF;
44
overflow: hidden;
55
flex: 1;
6-
top: 70px;
6+
top: 5.48em
77
}

js/lib/cytoscape.js

+17-18
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ require('./elements_style.css');
3434

3535
const DEF_BG = '#FFFFFF';
3636
const DEF_LAYOUT = 'cose';
37-
const DEF_HEIGHT = '500px';
37+
const DEF_HEIGHT = '700px';
3838

3939
const DEF_STYLE = [{
4040
selector: 'node',
@@ -302,14 +302,13 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
302302
.css({'font-size': '16px', 'margin-top': '10px'});
303303

304304
that.$pyvipr = $("<h1>PyViPR</h1>")
305-
.css({'font-size': '1.3em', 'margin-top': '10px', 'color': 'gray',
305+
.css({'font-size': '1.3em', 'color': 'gray', 'margin': '0',
306306
'font-family': "\'Lucida console\', Lucida, monospace", 'font-weight': 'bold'});
307307

308308
that.$title = $("<div id='title'></div>")
309309
.append(that.$model_title);
310310

311311
that.$pyviprdiv = $("<div id='pyviprid'></div>")
312-
.css({'position': 'absolute', 'left': '0.6em', 'bottom': '2em'})
313312
.append(that.$pyvipr);
314313

315314
// Searchbox elements
@@ -318,7 +317,8 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
318317
that.$search_wrapper = $("<div id='searchDiv'></div>")
319318
.append(that.$search);
320319

321-
that.$info = $("<div id='info'></div>");
320+
that.$info = $("<div id='info'></div>")
321+
.css({'color': 'black'})
322322

323323
// Fit button to fit network to cell space
324324
that.$fitButton = $("<button id='fitbuttonid'><i class=\"fa fa-arrows-h\"></i></button>");
@@ -328,10 +328,11 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
328328
.css({
329329
"width": "100%",
330330
"height": "5em",
331-
"bottom": "500px",
332-
"position": "relative",
333331
"border": "medium solid grey",
334-
"border-radius": "10px"
332+
"border-radius": "10px",
333+
"background-color": "#FFFFFF",
334+
"position": "relative",
335+
"bottom": "700px"
335336
})
336337
.append(that.$downloadButton)
337338
.append(that.$fitButton)
@@ -431,7 +432,8 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
431432
"width": "100%",
432433
"height": "50px",
433434
"bottom": "0px",
434-
"position": "relative"
435+
"position": "relative",
436+
"background-color": "white"
435437
})
436438
.append(that.$playButton)
437439
.append(that.$slider)
@@ -635,18 +637,14 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
635637
// https://github.com/atomiks/tippyjs/issues/661
636638
let dummyDomEle = document.createElement('div');
637639
node.tippy = tippy( dummyDomEle, {
638-
onCreate: function(instance){ // mandatory
639-
// patch the tippy's popper reference so positioning works
640-
// https://atomiks.github.io/tippyjs/misc/#custom-position
641-
instance.popperInstance.reference = ref;
642-
},
640+
getReferenceClientRect: ref.getBoundingClientRect,
643641
lazy: false, // mandatory
644642
trigger: 'manual', // mandatory
645643
// dom element inside the tippy:
646644
content: function(){ // function can be better for performance
647-
let div = document.createElement('div');
648-
div.innerHTML = text;
649-
return div;
645+
let content = document.createElement('div');
646+
content.innerHTML = text;
647+
return content;
650648
},
651649
// your own preferences:
652650
arrow: true,
@@ -910,7 +908,7 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
910908
that.groupSelected = $("<button id='groupSel'>Group</button>")
911909
.css({
912910
'position': 'absolute',
913-
'right': '9.4em',
911+
'right': '11em',
914912
'top': '0',
915913
'zIndex': '999',
916914
'height': '1.8em',
@@ -987,7 +985,8 @@ let CytoscapeView = widgets.DOMWidgetView.extend({
987985

988986
that.$popup = $("<div class='fragment'>" +
989987
"</div>")
990-
.css({'border': '1px solid #ccc','background': '#FF7F7F'})
988+
.css({'border': '1px solid #ccc','background': '#FF7F7F',
989+
'position': 'relative', 'bottom':'0', 'z-index': '999'})
991990
.append(that.$close)
992991
.append(that.$message)
993992
.appendTo(that.el.parentElement);

js/lib/elements_style.css

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
margin: 0.5em;
55
top: 0;
66
z-index: 9999;
7-
right: 6.4em;
7+
right: 6.8em;
88
height: 1.8em;
99
}
1010

@@ -44,6 +44,7 @@
4444
margin: 0;
4545
padding: 0;
4646
cursor: pointer;
47+
color: black;
4748
}
4849

4950
.tt-suggestion + .tt-suggestion {
@@ -112,6 +113,14 @@
112113
width: 11em;
113114
}
114115

116+
#pyviprid {
117+
position: absolute;
118+
left: 0;
119+
top: 0em;
120+
z-index: 9999;
121+
width: 11em;
122+
}
123+
115124
#info {
116125
position: absolute;
117126
left: 0;

js/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pyvipr",
3-
"version": "1.0.2",
3+
"version": "1.0.4",
44
"description": "Dynamic and static visualizations of systems biology models written in SBML, BNGL, and PySB",
55
"author": "Oscar Ortega",
66
"main": "lib/index.js",

pyvipr/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
66
'' if version_info[3]=='final' else _specifier_[version_info[3]]+str(version_info[4]))
7-
__frontend_version__ = '^1.0.2'
7+
__frontend_version__ = '^1.0.4'

0 commit comments

Comments
 (0)