fixing error when vis has no spy panel

This commit is contained in:
ppisljar 2016-11-17 12:39:29 +01:00
parent a22d236d91
commit c47f84984e

View file

@ -76,8 +76,10 @@ uiModules
$scope.spy.mode = ($scope.uiState) ? $scope.uiState.get('spy.mode', {}) : {};
let applyClassNames = function () {
let $visEl = getVisContainer();
const $visEl = getVisContainer();
const $spyEl = getSpyContainer();
if (!$spyEl) return;
let fullSpy = ($scope.spy.mode && ($scope.spy.mode.fill || $scope.fullScreenSpy));
$visEl.toggleClass('spy-only', Boolean(fullSpy));