Commit 8e87d0a1 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

graph.js, scatterPlot.js, css: toggle visibility of this bar depending on the choosen axis

.setOtherVisibility()
parent 03af760c
...@@ -184,6 +184,7 @@ line { ...@@ -184,6 +184,7 @@ line {
stroke: #839496; stroke: #839496;
opacity: 0.25 ; opacity: 0.25 ;
stroke-width: 10px; stroke-width: 10px;
display: none;
} }
.axis_h { .axis_h {
stroke: #839496; stroke: #839496;
......
...@@ -184,6 +184,7 @@ line { ...@@ -184,6 +184,7 @@ line {
stroke: #657b83; stroke: #657b83;
opacity: 0.25 ; opacity: 0.25 ;
stroke-width: 10px; stroke-width: 10px;
display: none;
} }
.axis_h { .axis_h {
stroke: #657b83; stroke: #657b83;
......
...@@ -232,6 +232,7 @@ line { ...@@ -232,6 +232,7 @@ line {
stroke: @default ; stroke: @default ;
opacity: 0.25 ; opacity: 0.25 ;
stroke-width: 10px; stroke-width: 10px;
display: none;
} }
.axis_h{ .axis_h{
......
...@@ -102,6 +102,7 @@ function Graph(id, model) { ...@@ -102,6 +102,7 @@ function Graph(id, model) {
this.text_position_x = 60; this.text_position_x = 60;
this.m.view.push(this) this.m.view.push(this)
this.m.graph = this // TODO: find a better way to do this
} }
Graph.prototype = { Graph.prototype = {
...@@ -1070,7 +1071,7 @@ Graph.prototype = { ...@@ -1070,7 +1071,7 @@ Graph.prototype = {
//other selected time_point //other selected time_point
if ( this.m.samples.order.indexOf(this.m.tOther) != -1 ){ if ( this.m.samples.order.indexOf(this.m.tOther) != -1 ){
this.mobilOther = {}; this.mobilOther = {};
this.mobilOther.type = "axis_m_previous"; this.mobilOther.type = "axis_m_other";
this.mobilOther.text = ""; this.mobilOther.text = "";
this.mobilOther['class'] = "graph_text"; this.mobilOther['class'] = "graph_text";
this.mobilOther.orientation = "vert"; this.mobilOther.orientation = "vert";
...@@ -1080,7 +1081,14 @@ Graph.prototype = { ...@@ -1080,7 +1081,14 @@ Graph.prototype = {
return this return this
}, },
setOtherVisibility: function (visible) {
if (visible) {
$(".axis_m_other").show("fast")
} else {
$(".axis_m_other").hide("fast")
}
},
/* ************************************************ * /* ************************************************ *
* RENDERER FUNCTIONS * RENDERER FUNCTIONS
......
...@@ -1964,6 +1964,11 @@ ScatterPlot.prototype = { ...@@ -1964,6 +1964,11 @@ ScatterPlot.prototype = {
}else{ }else{
this.update(); this.update();
} }
if (typeof m.graph != "undefined") {
m.graph.setOtherVisibility(this.splitX == "otherSize" || this.splitY == "otherSize")
}
}, },
......
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