ProjectContextMenu

A context menu for project management operations (rename, new, duplicate, delete, make-local, upload). When no project is provided only the "New project" item is shown.

Constructor

new ProjectContextMenu(x, y, project, callbacks)

Parameters:
NameTypeDescription
xnumberpreferred left position in viewport pixels
ynumberpreferred top position in viewport pixels
projectobject | nullproject the menu acts on, or null for a general menu
callbacksobjectcallback functions for each menu action
Properties
NameTypeAttributesDescription
onDeletefunction<optional>
called when "Delete" is clicked
onDuplicatefunction<optional>
called when "Duplicate" is clicked
onNewfunction<optional>
called when "New project" is clicked
onOpenfunction<optional>
called when "Open local project" is clicked
onRenamefunction<optional>
called when "Rename" is clicked
onUploadfunction | null<optional>
called when "Upload changes" is clicked; omit to hide item
onDownloadfunction | null<optional>
called when "Download project" is clicked; omit to hide item
onRevertfunction | null<optional>
called when "Revert changes" is clicked; omit to hide item
onMoveToFolderfunction | null<optional>
called when "Move to folder" is clicked; omit to hide item
onNewFolderfunction | null<optional>
called when "New folder" is clicked; omit to hide item
onPresentationfunction | null<optional>
called when "Open Presentation" is clicked; omit to hide item
onSharefunction | null<optional>
called when "Share…" is clicked; omit to hide item
onCompressfunction | null<optional>
called when "Compress…" is clicked; omit to hide item
onDismissfunction<optional>
called when the menu is dismissed via outside click

Classes

ProjectContextMenu

Methods

close()

Removes the context menu from the DOM.