From eced44934e41e516e587e836d55564d2cd8ca7b8 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 30 Aug 2022 19:56:38 +0200 Subject: [PATCH] Added clamping of 0.0 to 1.0 to the rotationOrigin property. --- es-core/src/GuiComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/GuiComponent.cpp b/es-core/src/GuiComponent.cpp index 60840fa91..d16652ad5 100644 --- a/es-core/src/GuiComponent.cpp +++ b/es-core/src/GuiComponent.cpp @@ -361,7 +361,7 @@ void GuiComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("rotation")) setRotationDegrees(elem->get("rotation")); if (elem->has("rotationOrigin")) - setRotationOrigin(elem->get("rotationOrigin")); + setRotationOrigin(glm::clamp(elem->get("rotationOrigin"), 0.0f, 1.0f)); } if (properties & ThemeFlags::Z_INDEX && elem->has("zIndex"))