Skip to content

Conversation

thet
Copy link
Member

@thet thet commented Sep 24, 2019

A second pattern pat-fullscreen-close which is triggered on close-fullscreen CSS class allows for closing the fullscreen with custom buttons.

A second pattern ``pat-fullscreen-close`` which is triggered on ``close-fullscreen`` CSS class allows for closing the fullscreen with custom buttons.
@thet thet requested a review from pilz September 24, 2019 09:07
], function(Base, screenful) {
return Base.extend({
name: "fullscreen-close",
trigger: ".close-fullscreen",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attention: this is against the convention of using the pattern name pat-fullscreen-close as trigger. But since this makes only sense in the context of this fullscreen pattern this might be OK.

@cornae
Copy link
Member

cornae commented Sep 24, 2019 via email

@thet
Copy link
Member Author

thet commented Sep 24, 2019

@cornae the close-fullscreen event handler is initialized before you inject any slides. So, after injection, the event handler is not applied. But the injection pattern re-scans the injected dom tree for any patterns and initializes them. Therefore the close-button needs to be in a own pattern.
I don't see another solution other then ones which would end up in a hack.
You can still use the .close-fullscreen CSS class.

@pilz pilz changed the title Add pat-fullscreen-close pattern Add pat-fullscreen support for close Sep 25, 2019
@pilz pilz merged commit 41d5574 into master Sep 25, 2019
@pilz pilz deleted the feature/pat-fullscreen branch September 25, 2019 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants