diff --git a/modules/skybrowser/include/wwtcommunicator.h b/modules/skybrowser/include/wwtcommunicator.h index 76b1f63c9e..c0e76c3185 100644 --- a/modules/skybrowser/include/wwtcommunicator.h +++ b/modules/skybrowser/include/wwtcommunicator.h @@ -97,7 +97,6 @@ private: ghoul::Dictionary removeImageMessage(const std::string& id); ghoul::Dictionary setImageOpacityMessage(const std::string& id, double opacity); ghoul::Dictionary setLayerOrderMessage(const std::string& id, int version); - ghoul::Dictionary hideChromeGuiMessage(bool isHidden); // Requires a newer CEF version bool _isSyncedWithWwt = false; bool _borderColorIsDirty = false; diff --git a/modules/skybrowser/src/wwtcommunicator.cpp b/modules/skybrowser/src/wwtcommunicator.cpp index afd4f9fba8..2aaef0e890 100644 --- a/modules/skybrowser/src/wwtcommunicator.cpp +++ b/modules/skybrowser/src/wwtcommunicator.cpp @@ -171,8 +171,9 @@ void WwtCommunicator::setImageOpacity(int i, float opacity) { } void WwtCommunicator::hideChromeInterface(bool shouldHide) { - ghoul::Dictionary msg = hideChromeGuiMessage(shouldHide); - sendMessageToWwt(msg); + std::string script = "sendMessageToWWT({event : \"modify_settings\", " + "settings : [[\"hideAllChrome\", true]], target: \"app\"});"; + executeJavascript(script); } void WwtCommunicator::update() { @@ -310,14 +311,4 @@ ghoul::Dictionary WwtCommunicator::setLayerOrderMessage(const std::string& id, i return msg; } - -ghoul::Dictionary WwtCommunicator::hideChromeGuiMessage(bool isHidden) { - using namespace std::string_literals; - ghoul::Dictionary msg; - msg.setValue("event", "modify_settings"s); - msg.setValue("settings", "[[\"hideAllChrome\", true]]"s); - msg.setValue("target", "app"s); - - return msg; -} } // namespace openspace