Skip to content

Commit 25299a6

Browse files
committed
Correct highlight line mismatch between depth and bars.
Avoid implementation difference between scroll bar a no scroll bar components. Force depth to also have y-axis scroll bar
1 parent 1e46934 commit 25299a6

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bravue",
3-
"version": "0.18.6",
3+
"version": "0.18.7",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/components/SeqDepth.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<button class="close-button" v-on:click="$emit('close')">
44
<font-awesome-icon style="background-color:transparent;" :icon="closeIcon"></font-awesome-icon>
55
</button>
6-
<div id="holder" ref="holder">
6+
<div id="holder" ref="holder" style="overflow-y: scroll;">
77
<svg id="depthSvg" style="display: block;" height="100px" width="100%" preserveAspectRatio="none">
88
<clipPath id="data-area-clip">
99
<rect id="clip-rect" x="0%" y="0%" width="100%" height="100%"></rect>
@@ -117,6 +117,7 @@ export default {
117117
scaleSvg: function () {
118118
// Use template ref, holder, to access the width of the holding div.
119119
const container_width = this.holder?.offsetWidth || 1000
120+
console.log(`Depth holder offsetWidth: ${this.holder.offsetWidth} scrollWidth: ${this.holder.scrollWidth}`)
120121
121122
const depth_upper_limit = this.roundUpToTens(this.max_mean_seq_depth)
122123
@@ -132,6 +133,7 @@ export default {
132133
.range([x_range_begin, x_range_limit]);
133134
this.y_scale.domain([0, depth_upper_limit])
134135
.range([100, 0]);
136+
console.log(`Depth range: ${x_range_begin} to ${x_range_limit} delta: ${x_range_limit - x_range_begin}`)
135137
136138
// Match viewbox to containing element width setting the aspect ratio at draw time.
137139
this.svg = d3.select("#depthSvg")
@@ -214,6 +216,7 @@ export default {
214216
.attr("x1", this.x_scale(newVal))
215217
.attr("x2", this.x_scale(newVal))
216218
.attr("visibility", "inherit")
219+
console.log(`SeqDepth hi line val: ${newVal} x: ${this.x_scale(newVal)}`)
217220
}
218221
},
219222
}

src/components/TxBars.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export default {
9494
.attr("x1", this.x_scale(newVal))
9595
.attr("x2", this.x_scale(newVal))
9696
.attr("visibility", "inherit")
97+
console.log(`TxBars hi line val: ${newVal} x: ${this.x_scale(newVal)}`)
9798
}
9899
},
99100
},
@@ -132,9 +133,11 @@ export default {
132133
// Calc viewbox dimensions
133134
const row_height = 28
134135
const row_mid = Math.floor(row_height * 0.7)
135-
const container_width = this.scroller?.scrollWidth || 1000
136+
const container_width = this.scroller?.offsetWidth || 1000
136137
const container_height = this.numTranscripts * row_height
137138
139+
console.log(`Bars scroller offsetWidth: ${this.scroller.offsetWidth} scrollWidth: ${this.scroller.scrollWidth}`)
140+
138141
// Discrete range used in mapping transcript id to a specific y value
139142
const y_discrete_range = Array.from(Array(this.numTranscripts).keys()).map(v => v * row_height)
140143
@@ -161,6 +164,7 @@ export default {
161164
.range([0,x_range_limit])
162165
y_scale.domain(this.uniqTranscripts)
163166
.range(y_discrete_range)
167+
console.log(`Bars range: 0 to ${x_range_limit} delta: ${x_range_limit - 0}`)
164168
165169
// Draw transcript row boxes for handling highlight and mouseover
166170
bkgds

0 commit comments

Comments
 (0)