Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive resizing #55

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
53f8d76
Initial size to container div size. Scaling when resized (including t…
davidhoksza Aug 31, 2017
07919c0
Enable loading datasource using url using: url = 'data:text/plain,' …
davidhoksza Sep 28, 2017
1d5ece1
Preserv aspect ratio
davidhoksza Oct 5, 2017
1bdb910
Fixing loading external sources from data URI so that it works also f…
davidhoksza Oct 6, 2017
54d6f37
Invisible path in display viewer (in default view it was not visible …
davidhoksza Oct 6, 2017
70806bd
Non-resizing. FV width obtained dynamically.
davidhoksza Oct 9, 2017
163fe0d
Scaling of categories.
davidhoksza Oct 9, 2017
7e7058a
Variant scaling
davidhoksza Oct 11, 2017
052e55a
Merge branch 'master' into scaling
davidhoksza Oct 11, 2017
977fd74
Listening to iframe event. Added examples.
davidhoksza Oct 12, 2017
b8c296c
Reverting custom data loading.
davidhoksza Oct 12, 2017
a497943
Added missing semicolons.
davidhoksza Oct 12, 2017
f5ab4a4
Enabled specification of the JSON data sources using data URI
davidhoksza Oct 13, 2017
5d14f25
Iframe resize element creation moved from the onready function which …
davidhoksza Nov 27, 2017
79e4095
Merge branch 'scaling' into uri-data-sources
davidhoksza Nov 27, 2017
7e63b7a
Resize after iframe adding
davidhoksza Nov 28, 2017
d2ccdb2
Padding for the main view so that the aa lables do not start at posit…
davidhoksza Nov 30, 2017
268ba54
no message
davidhoksza Nov 30, 2017
244ea95
Modified fv width testing to not create category name element when n…
davidhoksza Dec 18, 2017
494007c
IFrame as child of up_pftv_container.
davidhoksza Jan 10, 2018
909c8c1
Fix leaking fv variable to global scope
davidhoksza Jan 12, 2018
9a6596e
Enabling multiple custom data sources.
davidhoksza Feb 26, 2018
34d7ec6
Fix possibly undefined accession when custom data source's promise re…
davidhoksza Mar 22, 2018
4e4bb73
Fix possibly undefined accession when custom data source's promise re…
davidhoksza Mar 22, 2018
fb3be29
added border-box style to category name (otherwise bootstrap messes t…
davidhoksza Jun 7, 2018
f914765
fix problems with selection caused by introducing box-sizing
davidhoksza Jun 7, 2018
1b859ce
fix problems with selection caused by introducing box-sizing
davidhoksza Jun 7, 2018
38d45b6
fix problems with selection caused by introducing box-sizing
davidhoksza Jun 7, 2018
873166c
Fix wrong variants histogram max height for custom data sources
davidhoksza Sep 11, 2018
02da89b
Fixed overflow of long categories names
davidhoksza Sep 11, 2018
edb8fd4
Update variants histogram with filter change
davidhoksza Sep 26, 2018
a3bf8ca
variantDataUpdated event
davidhoksza Nov 30, 2018
6f95864
temporary category only in memory (issues in FF)
davidhoksza Mar 30, 2020
de62b9e
header changed to dataType
Apr 3, 2020
9788e49
dataType replaced for contentType in post request
Apr 3, 2020
dcf38f4
dataType replaced for contentType in post request
Apr 3, 2020
a127f1a
added unpack function into post request handling
Apr 3, 2020
32b7d6e
temporary fix for obtaining width of category name
davidhoksza May 13, 2020
6b6fa70
make reset highlight available
davidhoksza Jun 30, 2020
3331774
highlight parameter to allow not zooming out if selection is out of c…
davidhoksza Jul 29, 2020
acd00f1
programatically zooming in
davidhoksza Jul 29, 2020
70211d0
Adapt for change in Proteins API
davidhoksza Oct 11, 2020
c55f354
Adapt for change in Proteins API
davidhoksza Oct 11, 2020
0fc5150
fixed incompatible npm and gulp version
davidhoksza Oct 30, 2021
55f1b67
added variantFilterDefaultBehavior enabling variant filter behavior a…
davidhoksza Oct 30, 2021
ab36f83
phantomjs cannot be installed using node 16
piotr-gawron Jul 4, 2022
d5e8390
Merge pull request #1 from piotr-gawron/issue-with-node-16
davidhoksza Jul 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,45 @@
<script src="build/ProtVista.js"></script>
<link href="build/css/main.css" rel="stylesheet"/>

<div id=yourDiv></div>
<style>
h2 {
text-align: center;
padding-top: 10px;
}
</style>

<h2>Fixed width</h2>
<div style="margin: 10px">
For fixed width, the PV containing div needs to have a set width.
</div>
<div id="yourDivFixed" style="width: 800px"></div>

<h2>Dynamic size</h2>
<div style="margin: 10px">
Without set width, a DIV elemebt takes 100% of width of the parent element (window in this case).
Because ProtVista plugin is listening to its embedded iframe window resize event, it scales accordingly.
</div>
<div id="yourDivDynamic"></div>

<h2>Dynamic size with minimal width</h2>
<div style="margin: 10px">
It is possible to set a minimal width which the ProtVista plugin can take (600px here).
</div>
<div id="yourDivDynamicMin"></div>


<script>
// you can
var yourDiv = document.getElementById("yourDiv");
var ProtVista = require('ProtVista');
new ProtVista({el: yourDiv, uniprotacc : 'P05067'});

var yourDivFixed = document.getElementById("yourDivFixed");
new ProtVista({el: yourDivFixed, uniprotacc : 'Q99LX0'});

var yourDivDynamic = document.getElementById("yourDivDynamic");
new ProtVista({el: yourDivDynamic, uniprotacc : 'P05067'});

var yourDivDynamicMin = document.getElementById("yourDivDynamicMin");
new ProtVista({el: yourDivDynamicMin, uniprotacc : 'P05067', minWidth : 600});


</script>
4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ gulp.task('build-browser-min',['copy-resources'], function() {
return b.bundle()
.pipe(source(outputFile + ".min.js"))
.pipe(chmod(644))
.pipe(streamify(uglify()))
.pipe(streamify(uglify().on('error', function(e){
console.log(e);
})))
.pipe(gulp.dest(buildDir));
});

Expand Down
Loading