fix(): fixed issue with series override color selector when using the mouse to select color option, fixes #4620

This commit is contained in:
Torkel Ödegaard 2016-04-08 18:12:08 -04:00
parent 1a29a769c6
commit 52e2091f2c
3 changed files with 8 additions and 1 deletions

View File

@ -46,9 +46,12 @@ function popoverSrv($compile, $rootScope) {
drop.on('close', () => { drop.on('close', () => {
popoverScope.dismiss({fromDropClose: true}); popoverScope.dismiss({fromDropClose: true});
destroyDrop(); destroyDrop();
if (options.onClose) {
options.onClose();
}
}); });
drop.open(); setTimeout(() => { drop.open(); }, 10);
}; };
} }

View File

@ -60,6 +60,9 @@ define([
template: '<gf-color-picker></gf-color-picker>', template: '<gf-color-picker></gf-color-picker>',
model: { model: {
colorSelected: $scope.colorSelected, colorSelected: $scope.colorSelected,
},
onClose: function() {
$scope.ctrl.seriesOverrideChanged();
} }
}); });
}; };

View File

@ -22,6 +22,7 @@ define([
ctx.scope.ctrl = { ctx.scope.ctrl = {
refresh: sinon.spy(), refresh: sinon.spy(),
render: sinon.spy(), render: sinon.spy(),
seriesOverrideChanged: sinon.spy(),
seriesList: [] seriesList: []
}; };
ctx.scope.render = function() {}; ctx.scope.render = function() {};