Merge pull request #5396 from kjac/v8-fix-color-picker-label-enabled

V8: Make sure that the color picker labels are always shown
This commit is contained in:
Sebastiaan Janssen
2019-05-22 14:43:17 +02:00
committed by GitHub

View File

@@ -66,7 +66,7 @@
(function () {
'use strict';
function ToggleDirective(localizationService, eventsService) {
function ToggleDirective(localizationService, eventsService, $timeout) {
function link(scope, el, attr, ctrl) {
@@ -75,7 +75,11 @@
function onInit() {
setLabelText();
eventsService.emit("toggleValue", { value: scope.checked });
// must wait until the current digest cycle is finished before we emit this event on init,
// otherwise other property editors might not yet be ready to receive the event
$timeout(function () {
eventsService.emit("toggleValue", { value: scope.checked });
}, 100);
}
function setLabelText() {