fix(studio): disable the rotation field when the element can't be rotated#1412
Merged
miguel-heygen merged 1 commit intoJun 13, 2026
Conversation
…ated The PropertyPanel transform fields X/Y and W/H disable themselves when the element lacks the matching capability (`canApplyManualOffset` / `canApplyManualSize`), but the rotation field "R" had no `disabled` guard. So on an element where `canApplyManualRotation` is false (locked composition, script-generated, composition root/host) you could still type a rotation into the R field, even though the rotate gesture and the overlay rotate button are both already gated by that same capability. Add `manualRotationEditingDisabled` and apply it to the R field, matching the sibling fields and the gesture/overlay gating.
miguel-heygen
approved these changes
Jun 13, 2026
miguel-heygen
left a comment
Collaborator
There was a problem hiding this comment.
Confirmed real bug — the R field was the only transform field in PropertyPanel without a disabled guard. The overlay rotation handle and gesture are already gated by canApplyManualRotation, so this was the only unguarded path.
Fix is correct and minimal: adds manualRotationEditingDisabled following the exact same pattern as manualOffsetEditingDisabled and manualSizeEditingDisabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the PropertyPanel transform section, X/Y and W/H disable themselves when the element lacks the matching capability:
The rotation field "R" had no
disabledguard at all. So on an element wherecanApplyManualRotationis false (locked composition, script-generated, composition root/host), you could still type a rotation into the R field, even though that same capability already gates:domEditOverlayStartGesture.ts:110), andDomEditOverlay.tsx:414).Fix
Add
manualRotationEditingDisabled = !element.capabilities.canApplyManualRotationand apply it to the R field, matching the sibling fields and the gesture/overlay gating.Notes
KeyframeNavigation) is a separate concern, already gated bySTUDIO_KEYFRAMES_ENABLED && gsapAnimId.PropertyPanel.test.tscovers pure style helpers only; the X/Y/W/Hdisabledprops have no render-test coverage either, and this mirrors them exactly.