From afce80124b940fd7de88e596e372733459bfa1c6 Mon Sep 17 00:00:00 2001 From: Benoit Lavenier <benoit.lavenier@e-is.pro> Date: Tue, 23 Mar 2021 17:35:11 +0100 Subject: [PATCH] [enh] Settings: Allow to disable UI Effects --- www/js/platform.js | 6 ++++++ www/js/services/settings-services.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/www/js/platform.js b/www/js/platform.js index 950d1f638..080a83727 100644 --- a/www/js/platform.js +++ b/www/js/platform.js @@ -271,6 +271,12 @@ angular.module('cesium.platform', ['ngIdle', 'cesium.config', 'cesium.services'] // Start settings csSettings.ready() + .then(function(settingsData) { + // Applying UI effects, if now already disable (e.g. because of poor platform grade) + if (UIUtils.motion.enable) { + UIUtils.setEffects(settingsData.uiEffects); + } + }) ])) // Load BMA diff --git a/www/js/services/settings-services.js b/www/js/services/settings-services.js index c79925b2a..4def9c84c 100644 --- a/www/js/services/settings-services.js +++ b/www/js/services/settings-services.js @@ -328,6 +328,8 @@ angular.module('cesium.settings.services', ['ngApi', 'cesium.config']) startPromise = null; // Emit event (used by plugins) api.data.raise.ready(data); + + return data; }); return startPromise; -- GitLab