Skip to content

Commit 69061c1

Browse files
Added reference lines
There are a few bugs, but the core functionality is there. Will fix bugs by Monday.
1 parent 7bc92ea commit 69061c1

5 files changed

Lines changed: 407 additions & 3 deletions

File tree

index.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,29 @@ <h4>Composite metadata</h4>
187187
<label for="keep-nucleosome" id="keep-nucleosome-lable">Keep nucleosome on plot</label>
188188
<input type="checkbox" id="keep-nucleosome" label="Plot Nucleosome" style="margin-top: 15px;">
189189
</div>
190+
<script src="js/widgets/nucleosome_slider.js"></script>
191+
<script src="js/events/generate_3D_Button.js"></script>
190192
</div>
191193
<div style="display: none;" id="reference-axes-pane" class="plot-pane">
192-
<table id="reference-axes"></table>
194+
<label for="y-axis-lines" style="float: left;">Y-Axis Lines</label>
195+
<div class="reference-table-div">
196+
<table id="y-axis-lines" class="reference-lines-table"></table>
197+
</div>
198+
<svg id="y-plus" height="30" width="30" xmlns="http://www.w3.org/2000/svg" style="margin-left:41%;margin-right:59%;margin-top:10px;">
199+
<circle r="15" cx="15" cy="15" fill="grey" />
200+
<path d="m 15 2 l 0 26 M 2 15 l 26 0" stroke-width="4" stroke="white" />
201+
</svg>
202+
<label for="x-axis-lines" style="float: left;">X-Axis Lines</label>
203+
<div class="reference-table-div">
204+
<table id="x-axis-lines" class="reference-lines-table"></table> </table>
205+
</div>
206+
<svg id="x-plus" height="30" width="30" xmlns="http://www.w3.org/2000/svg" style="margin-left:41%;margin-right:59%;margin-top:10px;">
207+
<circle r="15" cx="15" cy="15" fill="grey" />
208+
<path d="m 15 2 l 0 26 M 2 15 l 26 0" stroke-width="4" stroke="white" />
209+
</svg>
193210
<script src="js/widgets/reference_axes.js"></script>
194211
</div>
195212
</div>
196-
<script src="js/widgets/nucleosome_slider.js"></script>
197-
<script src="js/events/generate_3D_Button.js"></script>
198213
</div>
199214
</div>
200215
<div class="row">

js/events/plot_tabs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ $(function() {
44
})
55
d3.select("#reference-axes-tab").on("click", function() {
66
showPane("reference-axes-pane", this);
7+
$("#main-plot").main_plot("toggle_tooltip", false);
78
})
89
d3.select("#nucleosome-slider-tab").on("click", function() {
910
showPane("nucleosome-slider-options", this);

js/widgets/main_plot.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ $(function() {
4848
return this.xscale;
4949
},
5050

51+
get_yscale: function(){
52+
return this.yscale;
53+
},
54+
5155
get_dimensions: function(){
5256
return [this.height, this.width, this.margins.right, this.margins.bottom, this.margins.left, this.margins.top];
5357
},
@@ -172,6 +176,9 @@ $(function() {
172176
main_plot.append("g")
173177
.attr("id", "coord-svg-layer");
174178

179+
main_plot.append("g")
180+
.attr("id", "reference-axes-layer");
181+
175182
main_plot.on("mousemove", function(e) {
176183
$("#main-plot").main_plot("move_tooltip", e)
177184
});

0 commit comments

Comments
 (0)