mark dirty when constraint changes
mark the constraint dirty when its values change
Diffs=
b2d27b6bd mark dirty when constraint changes (#7909)
Co-authored-by: hernan <hernan@rive.app>
diff --git a/.rive_head b/.rive_head
index a69c899..1e82764 100644
--- a/.rive_head
+++ b/.rive_head
@@ -1 +1 @@
-5c14a4a306b45042e505a7a7ba176e301f1d8305
+b2d27b6bde96e68a9cac4f3b7efd12782e9351cd
diff --git a/include/rive/constraints/distance_constraint.hpp b/include/rive/constraints/distance_constraint.hpp
index 83a9f9f..5af1a70 100644
--- a/include/rive/constraints/distance_constraint.hpp
+++ b/include/rive/constraints/distance_constraint.hpp
@@ -8,6 +8,8 @@
{
public:
void constrain(TransformComponent* component) override;
+ void distanceChanged() override;
+ void modeValueChanged() override;
};
} // namespace rive
diff --git a/src/constraints/distance_constraint.cpp b/src/constraints/distance_constraint.cpp
index 7565ed7..3ea5e66 100644
--- a/src/constraints/distance_constraint.cpp
+++ b/src/constraints/distance_constraint.cpp
@@ -55,3 +55,7 @@
world[4] = position.x;
world[5] = position.y;
}
+
+void DistanceConstraint::distanceChanged() { markConstraintDirty(); }
+
+void DistanceConstraint::modeValueChanged() { markConstraintDirty(); }
\ No newline at end of file