diff --git a/src/ui/heat_map.js b/src/ui/heat_map.js index 561d54839bbf7595926a698645215fe5b5e906a8..1ac1ae6dde076f1cfa34a5265f3de80713d0ffb1 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);