Skip to content

Commit 6f39e56

Browse files
committed
Update JBrowse track height config
1 parent f981aba commit 6f39e56

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

jbrowse/resources/external/mGAPSession.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
{
5858
"type": "ExtendedVariantDisplay",
5959
"displayId": "mgap_hg38-ExtendedVariantDisplay",
60-
"maxDisplayedBpPerPx": 5000,
60+
"maxFeatureScreenDensity": 100,
61+
"height": 400,
6162
"mouseover": "jexl:'Position: ' + formatWithCommas(get(feature,'POS'))",
6263
"renderer": {
6364
"type": "ExtendedVariantRenderer"

jbrowse/resources/web/jbrowse/window/ModifyJsonConfigWindow.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ Ext4.define('JBrowse.window.ModifyJsonConfigWindow', {
6565
handler: function (gridBtn) {
6666
this.addAttribute('chunkSizeLimit', null, 'INT');
6767
}
68+
},{
69+
text: 'Track Height',
70+
scope: this,
71+
handler: function (gridBtn) {
72+
this.addAttribute('trackHeight', 400, 'INT');
73+
}
6874
},{
6975
text: 'Max Track Height',
7076
scope: this,

jbrowse/src/org/labkey/jbrowse/model/JsonFile.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private JSONObject getVcfTrack(Logger log, ExpData targetFile, ReferenceGenome r
531531
put(new JSONObject(){{
532532
put("type", "ExtendedVariantDisplay");
533533
put("displayId", getJsonTrackId() + "-ExtendedVariantDisplay");
534-
put("maxDisplayedBpPerPx", 2000);
534+
put("maxFeatureScreenDensity", 100);
535535
put("mouseover", "jexl:'Position: ' + formatWithCommas(get(feature,'POS'))");
536536
put("renderer", new JSONObject(){{
537537
put("type", "ExtendedVariantRenderer");
@@ -550,6 +550,11 @@ private JSONObject getVcfTrack(Logger log, ExpData targetFile, ReferenceGenome r
550550
{
551551
getJSONObject("renderer").put("message", json.getString("additionalFeatureMsg"));
552552
}
553+
554+
if (json != null && json.has("trackHeight"))
555+
{
556+
put("height", json.getInt("trackHeight"));
557+
}
553558
}});
554559
}});
555560

0 commit comments

Comments
 (0)