Commit fe3c94ce authored by Raphael Müller's avatar Raphael Müller
Browse files

removed unnecessary properties from genomeStats

parent ee4bfca2
......@@ -2,18 +2,15 @@ var app = new Vue({
el: '#app',
data: {
genome_stats: {
id: "my-genome",
start: 1706479,
end: 1718084,
//tooltip: "name: {name}</br>description: {description}</br>start: {start}</br>end: {end}"
tooltip: ["name:Gene Name","type:Gene Type","description","start:Start","end:End","strand:Strand"],
colorMap: {"xRNA":"#CC0000", "PFAM":"#8e44ad"}
},
// genome_stats: {},
feature_data: [
{ name: "Gene 1",
description: "GMP synthase",
start: 1706479,
end: 1708024,
start: 1706470,
end: 1708020,
strand: "+",
type: "gene",
},
......
......@@ -12,7 +12,7 @@ Vue.component("genome-viewer",{
</feature>
<!-- -->
</svg>
<tool-tip v-if="currentFeature" :feature="currentFeature" :tip="genomeStats.tooltip" :x="(genomeToPixel(currentFeature.start)+genomeToPixel(currentFeature.end))/2" :y="y+to_h(lane(currentFeature))+lane_height" @remove="currentFeature = undefined" >
<tool-tip v-if="currentFeature && genomeStats.tooltip" :feature="currentFeature" :tip="genomeStats.tooltip" :x="(genomeToPixel(currentFeature.start)+genomeToPixel(currentFeature.end))/2" :y="y+to_h(lane(currentFeature))+lane_height" @remove="currentFeature = undefined" >
</tool-tip>
</div>`,
......@@ -21,14 +21,14 @@ Vue.component("genome-viewer",{
default: 1
},
genomeStats: {
validator (value) {
for (let property of ['id', 'start', 'end']) {
if (!value.hasOwnProperty(property)) {
return false
}
}
return true
}
// validator (value) {
// for (let property of ['id', 'start', 'end']) {
// if (!value.hasOwnProperty(property)) {
// return false
// }
// }
// return true
// }
},
featureData: {
validator (value) {
......@@ -87,7 +87,7 @@ Vue.component("genome-viewer",{
return this.genomeStop + this.tickSize
},
length(){
if(this.genomeStats.start < this.genomeStats.end){
if(this.genomeStart < this.genomeStop){
return this.genomeStop - this.genomeStart
}else{
// TODO: if genome is circular
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment