mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Ensure browser is initialized properly before executing javascript
This commit is contained in:
@@ -672,7 +672,8 @@ namespace {
|
||||
|
||||
SkyBrowserModule* module = global::moduleEngine->module<SkyBrowserModule>();
|
||||
TargetBrowserPair* pair = module->pair(identifier);
|
||||
if (pair) {
|
||||
// Make sure the webpage has loaded properly before executing javascript on it
|
||||
if (pair && pair->browser()->isInitialized()) {
|
||||
pair->setBorderRadius(std::clamp(radius, 0.0, 1.0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ void ScreenSpaceSkyBrowser::update() {
|
||||
_isInitialized = false;
|
||||
}
|
||||
|
||||
if (_radiusIsDirty) {
|
||||
if (_radiusIsDirty && _isInitialized) {
|
||||
setBorderRadius(_borderRadius);
|
||||
_radiusIsDirty = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user