Skip to content

Commit

Permalink
Merge branch 'release/0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Feb 15, 2018
2 parents 7cd5d30 + fd97e78 commit 7a38aea
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 126 deletions.
23 changes: 14 additions & 9 deletions assets/js/app/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ LocusZoom.Dashboard.prototype.destroy = function(force){
* @class
* @param {Object} layout A JSON-serializable object of layout configuration parameters
* @param {('left'|'right')} [layout.position='left'] Whether to float the component left or right.
* @param {('start'|'middle'|'end')} [layout.group_position] Buttons can optionally be gathered into a visually
* distinctive group whose elements are closer together. If a button is identified as the start or end of a group,
* it will be drawn with rounded corners and an extra margin of spacing from any button not part of the group.
* For example, the region_nav_plot dashboard is a defined as a group.
* @param {('gray'|'red'|'orange'|'yellow'|'green'|'blue'|'purple'} [layout.color='gray'] Color scheme for the
* component. Applies to buttons and menus.
* @param {LocusZoom.Dashboard} parent The dashboard that contains this component
Expand Down Expand Up @@ -915,22 +919,23 @@ LocusZoom.Dashboard.Components.add("download", function(layout){
* NOTE: Will only work on panel dashboards.
* @class LocusZoom.Dashboard.Components.remove_panel
* @augments LocusZoom.Dashboard.Component
* @param {Boolean} [layout.suppress_confirm=false] If true, removes the panel without prompting user for confirmation
*/
LocusZoom.Dashboard.Components.add("remove_panel", function(layout){
LocusZoom.Dashboard.Components.add("remove_panel", function(layout) {
LocusZoom.Dashboard.Component.apply(this, arguments);
this.update = function(){
this.update = function() {
if (this.button){ return this; }
this.button = new LocusZoom.Dashboard.Component.Button(this)
.setColor(layout.color).setHtml("×").setTitle("Remove panel")
.setOnclick(function(){
if (confirm("Are you sure you want to remove this panel? This cannot be undone!")){
var panel = this.parent_panel;
panel.dashboard.hide(true);
d3.select(panel.parent.svg.node().parentNode).on("mouseover." + panel.getBaseId() + ".dashboard", null);
d3.select(panel.parent.svg.node().parentNode).on("mouseout." + panel.getBaseId() + ".dashboard", null);
return panel.parent.removePanel(panel.id);
if (!layout.suppress_confirm && !confirm("Are you sure you want to remove this panel? This cannot be undone!")){
return false;
}
return false;
var panel = this.parent_panel;
panel.dashboard.hide(true);
d3.select(panel.parent.svg.node().parentNode).on("mouseover." + panel.getBaseId() + ".dashboard", null);
d3.select(panel.parent.svg.node().parentNode).on("mouseout." + panel.getBaseId() + ".dashboard", null);
return panel.parent.removePanel(panel.id);
}.bind(this));
this.button.show();
return this;
Expand Down
2 changes: 1 addition & 1 deletion assets/js/app/LocusZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @namespace
*/
var LocusZoom = {
version: "0.7.0"
version: "0.7.1"
};

/**
Expand Down
25 changes: 15 additions & 10 deletions dist/locuszoom.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* @namespace
*/
var LocusZoom = {
version: "0.7.0"
version: "0.7.1"
};

/**
Expand Down Expand Up @@ -6113,6 +6113,10 @@ LocusZoom.Dashboard.prototype.destroy = function(force){
* @class
* @param {Object} layout A JSON-serializable object of layout configuration parameters
* @param {('left'|'right')} [layout.position='left'] Whether to float the component left or right.
* @param {('start'|'middle'|'end')} [layout.group_position] Buttons can optionally be gathered into a visually
* distinctive group whose elements are closer together. If a button is identified as the start or end of a group,
* it will be drawn with rounded corners and an extra margin of spacing from any button not part of the group.
* For example, the region_nav_plot dashboard is a defined as a group.
* @param {('gray'|'red'|'orange'|'yellow'|'green'|'blue'|'purple'} [layout.color='gray'] Color scheme for the
* component. Applies to buttons and menus.
* @param {LocusZoom.Dashboard} parent The dashboard that contains this component
Expand Down Expand Up @@ -6843,22 +6847,23 @@ LocusZoom.Dashboard.Components.add("download", function(layout){
* NOTE: Will only work on panel dashboards.
* @class LocusZoom.Dashboard.Components.remove_panel
* @augments LocusZoom.Dashboard.Component
* @param {Boolean} [layout.suppress_confirm=false] If true, removes the panel without prompting user for confirmation
*/
LocusZoom.Dashboard.Components.add("remove_panel", function(layout){
LocusZoom.Dashboard.Components.add("remove_panel", function(layout) {
LocusZoom.Dashboard.Component.apply(this, arguments);
this.update = function(){
this.update = function() {
if (this.button){ return this; }
this.button = new LocusZoom.Dashboard.Component.Button(this)
.setColor(layout.color).setHtml("×").setTitle("Remove panel")
.setOnclick(function(){
if (confirm("Are you sure you want to remove this panel? This cannot be undone!")){
var panel = this.parent_panel;
panel.dashboard.hide(true);
d3.select(panel.parent.svg.node().parentNode).on("mouseover." + panel.getBaseId() + ".dashboard", null);
d3.select(panel.parent.svg.node().parentNode).on("mouseout." + panel.getBaseId() + ".dashboard", null);
return panel.parent.removePanel(panel.id);
if (!layout.suppress_confirm && !confirm("Are you sure you want to remove this panel? This cannot be undone!")){
return false;
}
return false;
var panel = this.parent_panel;
panel.dashboard.hide(true);
d3.select(panel.parent.svg.node().parentNode).on("mouseover." + panel.getBaseId() + ".dashboard", null);
d3.select(panel.parent.svg.node().parentNode).on("mouseout." + panel.getBaseId() + ".dashboard", null);
return panel.parent.removePanel(panel.id);
}.bind(this));
this.button.show();
return this;
Expand Down
6 changes: 3 additions & 3 deletions dist/locuszoom.app.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/interval_annotations.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h4>Top Hits</h4>
.add("gene", ["GeneLZ", { url: apiBase + "annotation/genes/", params: {source: 2} }])
.add("recomb", ["RecombLZ", { url: apiBase + "annotation/recomb/results/", params: {source: 15} }])
.add("constraint", ["GeneConstraintLZ", { url: "http://exac.broadinstitute.org/api/constraint" }])
.add("intervals", ["IntervalLZ", { url: apiBase + "annotation/intervals/results/", params: {source: 16} }]);
.add("intervals", ["IntervalLZ", { url: apiBase + "annotation/intervals/results/", params: {source: 19} }]);

// Get the standard assocation plot layout from LocusZoom's built-in layouts
var mods = {
Expand Down Expand Up @@ -107,8 +107,8 @@ <h4>Top Hits</h4>
var start = 0;
var end = 0;
if (!pos.match(/[-+]/)) {
start = +pos - 300000
end = +pos + 300000
start = +pos - 300000;
end = +pos + 300000;
}
plot.applyState({ chr: chr, start: start, end: end, ldrefvar: "" });
return false;
Expand Down
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ <h4>Top Hits</h4>
<a name="get_it"></a>
<h3>Get LocusZoom.js</h3>

<h5><strong>Current stable release: <a href="https://github.com/statgen/locuszoom/releases/tag/v0.7.0">v0.7.0</a></strong></h5>
<h5><strong>Current stable release: <a href="https://github.com/statgen/locuszoom/releases/tag/v0.7.1">v0.7.1</a></strong></h5>
<p>To use LocusZoom.js in your application you will need <i>both</i> LocusZoom's compiled Javascript and CSS <i>and</i> two third-party Javascript libraries (available here in a single vendor bundle).</p>

<div class="row">
<div class="three columns">
<h6><strong>Javascript</strong></h6>
</div>
<div class="nine columns">
<tt><a href="https://statgen.github.io/locuszoom/versions/0.7.0/locuszoom.app.js">https://statgen.github.io/locuszoom/versions/0.7.0/locuszoom.app.js</a></tt>
<tt><a href="https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.app.js">https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.app.js</a></tt>
<br>
<small><i>minified:</i> <tt><a href="https://statgen.github.io/locuszoom/versions/0.7.0/locuszoom.app.min.js">locuszoom.app.min.js</a></tt></small>
<small><i>minified:</i> <tt><a href="https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.app.min.js">locuszoom.app.min.js</a></tt></small>
</div>
</div>

Expand All @@ -82,7 +82,7 @@ <h6><strong>Javascript</strong></h6>
<h6><strong>CSS</strong></h6>
</div>
<div class="nine columns">
<tt><a href="https://statgen.github.io/locuszoom/versions/0.7.0/locuszoom.css">https://statgen.github.io/locuszoom/versions/0.7.0/locuszoom.css</a></tt>
<tt><a href="https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.css">https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.css</a></tt>
<br>
<small><i>All CSS classes are namespaced to avoid collisions</i></small>
</div>
Expand All @@ -95,7 +95,7 @@ <h6><strong>CSS</strong></h6>
<h6><strong>Dependencies</strong></h6>
</div>
<div class="nine columns">
<tt><a href="https://statgen.github.io/locuszoom/locuszoom.vendor.min.js">https://statgen.github.io/locuszoom/locuszoom.vendor.min.js</a></tt>
<tt><a href="https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.vendor.min.js">https://statgen.github.io/locuszoom/versions/0.7.1/locuszoom.vendor.min.js</a></tt>
<br>
<small><i>Contains <a href="https://github.com/d3/d3">d3</a> v3.5.6 and <a href="https://github.com/kriskowal/Q">Q</a> (any version)</i></small>
</div>
Expand Down
Loading

0 comments on commit 7a38aea

Please sign in to comment.