mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-24 05:49:17 -06:00
Fix the "hideChromeInterface" call (will work as soon as the server wwt dist is updated)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user