Git Product home page Git Product logo

photoswipe's People

Contributors

j0nnybrav079 avatar

Watchers

 avatar  avatar

Forkers

cimeos

photoswipe's Issues

Latest update to ImageSerivce64 uses PHP 7.4 language features

The latest changes to that service seem to use PHP 7.4 language features. But the composer.json only requires 7.2.

protected FrontendConfigurationManager $frontendConfigurationManager;

I updated your extension to the latest version. On my local machine running 7.4 there were no errors. But on our Staging-Server currently behind at 7.3 I get the following error message. After upgrading the Staging-Servers PHP version to 7.4 it disappeared.

Bildschirmfoto 2022-02-02 um 13 04 46

So the composer.json should reflect those new PHP requirements or the type hint(s) must be removed and instead work with Doc comments @var notation to help the IDE. Then it should be fine too with lower PHP versions.

data sizing only works if cropping in image editor is touched

In v1.2.x the ATagParams were configured per Typoscript:

lib.contentElement.settings.media.popup.linkParams{ ATagParams.dataWrap = class="{$styles.content.textmedia.linkWrap.lightboxCssClass}" rel="{$styles.content.textmedia.linkWrap.lightboxRelAttribute}" data-size="{file:current:width}x{file:current:height}" }

Since v2 you do this in the service class ATagParams
Unfortunately now only witdh and height from the image manipulation editor are used and not the sizes of file:current as before.
So now the data sizes are only set if one has touched the image editor settings. If not, data sizes ar set to 0 with the effect that the image fills all available space.

Could you consider both settings resp. use file:current as fall back if cropping sizes are not set?

Links in figcaption not working.

This is a common HTML structure:

<figure>
<img>
<figcaption>Text with a <a>link</a>.</figcaption>
</figure>

The link added by PhotoSwipe should only listen to click events on img, not on the whole figure including figcaption. The current behaviour is overriding any link in the figcaption.

PHP 8 compatibility

I just wanted to ask, if we could set the PHP version dependency to add 8.0 and 8.1 as well?

I ignored this restriction and got no problems

ParseError with PHP 7.2.34

In TYPO3 CMS 10.4.31 with PHP 7.2.34 I get this:

(1/1) ParseError
syntax error, unexpected 'FrontendConfigurationManager' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
in /Users/heinzschilling/Web/werkhandkunst.test/typo3conf/ext/photoswipe/Classes/Service/ImageService64.php line 16

use TYPO3\CMS\Extbase\Service\ImageService;

class ImageService64
{
    protected FrontendConfigurationManager $frontendConfigurationManager;

    protected array $settings;

    public function injectFrontendConfigurationManager(FrontendConfigurationManager $fcm)

PHP 7.4.21 works.

data-size uses width and height from original image and not from the linked processed image

If you have for example an image in your gallery which is unprocessed 3000x2000px in size. Then the attribute of the link would render to data-size="3000x2000".

But according to the demo and docs of Photoswipe that should reflect the actual size of the linked image. Which would be in a standard TYPO3 installation maxed out to 800px in width and 600px in height. According to the following default constants styles.content.textmedia.linkWrap.width = 800m and styles.content.textmedia.linkWrap.height = 600m.

Therefore you have a linked large image for the gallery of max 800x600px and it gets zoomed to fill all available space in the photoswipe UI. And that might end up showing unwanted artifacts depending on how large your browser window and monitors are.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.