Use order to position it

This commit is contained in:
Manav Rathi 2025-02-13 09:56:42 +05:30
parent c17d0d0087
commit 6653b36764
No known key found for this signature in database

View File

@ -304,11 +304,19 @@ export class FileViewerPhotoSwipe {
}); });
// Add our custom UI elements to inside the PhotoSwipe dialog. // Add our custom UI elements to inside the PhotoSwipe dialog.
//
// API docs for registerElement:
// https://photoswipe.com/adding-ui-elements/#uiregisterelement-api
//
// The "order" prop is used to position items. Some landmarks:
// - counter: 5
// - zoom: 10
// - close: 20
pswp.on("uiRegister", () => { pswp.on("uiRegister", () => {
pswp.ui.registerElement({ pswp.ui.registerElement({
name: "info-button", name: "info-button",
ariaLabel: "File info", ariaLabel: "File info",
// order: order: 15,
isButton: true, isButton: true,
html: "Info", html: "Info",
onClick: (e) => { onClick: (e) => {