From a834171f53293ba97a09b570fe7e96117f78f2e1 Mon Sep 17 00:00:00 2001 From: joshua-gould Date: Mon, 11 Apr 2016 10:02:55 -0400 Subject: [PATCH] fixed legend height in saved image --- src/ui/heat_map.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/heat_map.js b/src/ui/heat_map.js index 561d548..1ac1ae6 100644 --- a/src/ui/heat_map.js +++ b/src/ui/heat_map.js @@ -2769,13 +2769,15 @@ morpheus.HeatMap.prototype = { var totalSize = this.getTotalSize(options); var legendHeight = 0; if (options.legend) { - this.heatmap.getColorScheme().getNames() != null ? this.heatmap - .getColorScheme().getNames().length * 14 : 40; + legendHeight = this.heatmap.getColorScheme().getNames() != null ? this.heatmap + .getColorScheme().getNames().length * 14 + : 40; context.save(); context.translate(50, 0); morpheus.HeatMapColorSchemeLegend.drawColorScheme(context, this.heatmap.getColorScheme(), 200, true); context.restore(); + } context.save(); context.translate(4, legendHeight); -- GitLab