Commit ac347fa0 by Alexander Zobnin

heatmap: fix error while loading panel in editor mode

parent ece6fd73
...@@ -769,8 +769,9 @@ export default function link(scope, elem, attrs, ctrl) { ...@@ -769,8 +769,9 @@ export default function link(scope, elem, attrs, ctrl) {
if (setElementHeight()) { if (setElementHeight()) {
if (data) {
// Draw default axes and return if no data // Draw default axes and return if no data
if (!data || _.isEmpty(data.buckets)) { if (_.isEmpty(data.buckets)) {
addHeatmapCanvas(); addHeatmapCanvas();
addAxes(); addAxes();
return; return;
...@@ -789,6 +790,9 @@ export default function link(scope, elem, attrs, ctrl) { ...@@ -789,6 +790,9 @@ export default function link(scope, elem, attrs, ctrl) {
$heatmap.on("mousedown", onMouseDown); $heatmap.on("mousedown", onMouseDown);
$heatmap.on("mousemove", onMouseMove); $heatmap.on("mousemove", onMouseMove);
$heatmap.on("mouseleave", onMouseLeave); $heatmap.on("mouseleave", onMouseLeave);
} else {
return;
}
} }
// Draw only if color editor is opened // Draw only if color editor is opened
......
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