mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[feature] Update attachment format, receive + send focalPoint
prop + use it on the frontend (#4052)
* [feature] Update attachment format, receive + send `focalPoint` prop + use it on the frontend * whoops * boop * restore function signature of ExtractAttachments
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
const Photoswipe = require("photoswipe/dist/umd/photoswipe.umd.min.js");
|
||||
const PhotoswipeLightbox = require("photoswipe/dist/umd/photoswipe-lightbox.umd.min.js");
|
||||
const PhotoswipeCaptionPlugin = require("photoswipe-dynamic-caption-plugin").default;
|
||||
const ObjectPosition = require("./photoswipe-object-position.js").default;
|
||||
const Plyr = require("plyr");
|
||||
const Prism = require("./prism.js");
|
||||
|
||||
@ -61,6 +62,10 @@ new PhotoswipeCaptionPlugin(lightbox, {
|
||||
}
|
||||
});
|
||||
|
||||
// Enable object-position plugin for lightbox so that css
|
||||
// object-position property can be used on preview images.
|
||||
new ObjectPosition(lightbox);
|
||||
|
||||
lightbox.addFilter('itemData', (item) => {
|
||||
const el = item.element;
|
||||
if (
|
||||
|
Reference in New Issue
Block a user