Commit a834171f authored by joshua-gould's avatar joshua-gould

fixed legend height in saved image

parent 18dc2a99
...@@ -2769,13 +2769,15 @@ morpheus.HeatMap.prototype = { ...@@ -2769,13 +2769,15 @@ morpheus.HeatMap.prototype = {
var totalSize = this.getTotalSize(options); var totalSize = this.getTotalSize(options);
var legendHeight = 0; var legendHeight = 0;
if (options.legend) { if (options.legend) {
this.heatmap.getColorScheme().getNames() != null ? this.heatmap legendHeight = this.heatmap.getColorScheme().getNames() != null ? this.heatmap
.getColorScheme().getNames().length * 14 : 40; .getColorScheme().getNames().length * 14
: 40;
context.save(); context.save();
context.translate(50, 0); context.translate(50, 0);
morpheus.HeatMapColorSchemeLegend.drawColorScheme(context, morpheus.HeatMapColorSchemeLegend.drawColorScheme(context,
this.heatmap.getColorScheme(), 200, true); this.heatmap.getColorScheme(), 200, true);
context.restore(); context.restore();
} }
context.save(); context.save();
context.translate(4, legendHeight); context.translate(4, legendHeight);
......
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