Browse Source

disable inputs on multiple select

Alejandro Toledo 5 years ago
parent
commit
42f9a9e209

+ 8 - 1
inspector/src/components/actionTabs/tabs/propertyGrids/animations/animationCurveEditorComponent.tsx

@@ -340,10 +340,17 @@ export class AnimationCurveEditorComponent extends React.Component<
      * This section handles events from SvgDraggableArea.
      */
     selectKeyframe(id: string, multiselect: boolean) {
-        const frameValue = this.getKeyframeValueFromAnimation(id);
+        let frameValue: IActionableKeyFrame | undefined;
         const selectedKeyFrame = this.state.svgKeyframes?.find((kf) => kf.id === id)?.selected;
         if (!multiselect) {
+            frameValue = this.getKeyframeValueFromAnimation(id);
             this.deselectKeyframes();
+        } else {
+            frameValue = { frame: undefined, value: undefined };
+        }
+
+        if (selectedKeyFrame) {
+            frameValue = { frame: undefined, value: undefined };
         }
 
         const updatedKeyframes = this.state.svgKeyframes?.map((kf) => {

File diff suppressed because it is too large
+ 1156 - 1155
inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor.scss


+ 0 - 2
inspector/src/components/actionTabs/tabs/propertyGrids/animations/timeline.tsx

@@ -148,8 +148,6 @@ export class Timeline extends React.Component<
             const unit = Math.round(containerWidth / this.state.selectionLength.length);
             const frame = Math.round((event.clientX - 233) / unit) + this.state.start;
             this.props.onCurrentFrameChange(frame);
-            //const possibleEmptyKeyframe: IAnimationKey = { frame: frame, value: null };
-            // this.props.repositionCanvas(possibleEmptyKeyframe);
         }
     }