-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix animation modal color layer validation #7882
Conversation
@@ -230,7 +230,8 @@ function CreateAnimationModal(props: Props) { | |||
cameraPosition: selectedCameraPosition, | |||
}; | |||
|
|||
if (!validateAnimationOptions(colorLayer, boundingBox, meshes)) return; | |||
const selectedColorLayer = colorLayers.find((layer) => layer.name === selectedColorLayerName)!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 108 already defines selectedColorLayer
, which should be usable here.
cf: line 108: const selectedColorLayer = getLayerByName(dataset, selectedColorLayerName);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus, I'd suggest to remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch. done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM & works 🎉
* fix animation modal color layer validation * changelog * rename variable * apply pr feedback * improve error message of uint24 layers in animation modal --------- Co-authored-by: Michael Büßemeyer <michael.buessemeyer@student.hpi.de>
* fix animation modal color layer validation * changelog * rename variable * apply pr feedback * improve error message of uint24 layers in animation modal --------- Co-authored-by: Michael Büßemeyer <michael.buessemeyer@student.hpi.de>
This PR fixes animation modal color layer validation. Unfortunately, the animation validation would always try the first color layer and not the selected one.
Steps to test:
uint24
color layer, submit --> validation erroruint8
color layer, submit --> successIssues:
(Please delete unneeded items, merge only when none are left open)