Remove custom hover flip code. Fixed upstream.

This commit is contained in:
Julius Volz 2015-02-06 15:02:13 +01:00
parent 198ac9538b
commit 0e8c0b67ad
2 changed files with 1 additions and 36 deletions

View File

@ -61,21 +61,6 @@ body {
width: 40px;
}
.graph .detail .x_label.flipped {
right: 0;
}
.graph .detail .item.flipped {
right: 10px;
}
.graph .detail .item.flipped:before {
content: "\25b8";
left: auto;
right: 1px;
font-size: 0.8em;
}
.graph .detail .item.active {
line-height: 1.4em;
padding: 0.5em;

View File

@ -456,27 +456,7 @@ Prometheus.Graph.prototype.updateGraph = function(reloadGraph) {
var swatch = '<span class="detail_swatch" style="background-color: ' + series.color + '"></span>';
var content = swatch + (series.labels["__name__"] || 'value') + ": <strong>" + y + '</strong><br>';
return content + self.renderLabels(series.labels);
},
onRender: function() {
var width = this.graph.width;
var element = $(this.element);
$(".x_label", element).each(function() {
if ($(this).outerWidth() + element.offset().left > width) {
$(this).addClass("flipped");
} else {
$(this).removeClass("flipped");
}
})
$(".item", element).each(function() {
if ($(this).outerWidth() + element.offset().left > width) {
$(this).addClass("flipped");
} else {
$(this).removeClass("flipped");
}
})
},
}
});
var legend = new Rickshaw.Graph.Legend({