Skip to content

Commit

Permalink
Add clear option to clip context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn-resolume committed Jun 13, 2024
1 parent 4c30443 commit 607f5bd
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,16 @@ function Clip(props) {
});
};

// revert thumbnail to default
const revert_thumbnail = () => {
context.remove(`/composition/clips/by-id/${props.id}/thumbnail`);
};

let menu_options = {
'Beat Snap': { param: props.beatsnap },
'Transport': { param: props.transporttype },
'Target': { param: props.target },
'Trigger Style': { param: props.triggerstyle },
'Fader Start': { param: props.faderstart },
'Ignore Column Trigger': { param: props.ignorecolumntrigger },
'Load Thumbnail': { action: () => setThumbnailPicker(true) },
'Revert Thumbnail': { action: () => revert_thumbnail() },
'Beat Snap': { param: props.beatsnap },
'Transport': { param: props.transporttype },
'Target': { param: props.target },
'Trigger Style': { param: props.triggerstyle },
'Fader Start': { param: props.faderstart },
'Ignore Column Trigger': { param: props.ignorecolumntrigger },
'Load Thumbnail': { action: () => setThumbnailPicker(true) },
'Revert Thumbnail': { action: () => context.remove(`/composition/clips/by-id/${props.id}/thumbnail`) },
'Clear': { action: () => context.post(`/composition/clips/by-id/${props.id}/clear`) },
};

/* Add 'Resize' option to menu if clip has video track */
Expand Down

0 comments on commit 607f5bd

Please sign in to comment.