Feedback on the 3.1 preview #1400
Comments
Hi, Thanks for the feedback!
|
Cool! Also the fancy confirm doesn't work any longer. Maybe you rewrote that? The animation doesn't complete leaving only the overlay visible. When setting it to full opacity (css) it shows up. And also if opening a confirm inside an already opened ajax box it shows up behind the previous one. Z-index somewhere to fix or can you add a parameter for layer? Another thing. The new url-hashes are cool in galleries but can I navigate to id's instead of 1,2,3...? Like set a data-id to 534 and it will be 534 in the url. The reason is I open things with different orders and if it's 1,2,3 I will get different things to open for the same number. If that makes any sense. Thanks! |
If you refer to custom show/hide animation for html elements, then there have been some improvements since first beta (btw, I updated preview to latest code). You can use |
Thanks for all the help! I was referring to the Confirm dialog box. The animation started to work again in beta-2 tho (or I messed it up previously)! It's still popping up behind the previously opened fancybox and now am facing problems with the confirm value not having any action. I guess something in here got changed?
How do I use the hash option? Something like this? I tried (I'm not 100% sure but I think the SecurityError in Safari is even worse when using the
Edit, I meant:
|
Thanks, you are giving me a valuable feedback :)
|
Thanks! I mean the example you have on this site under Advanced Confirm dialog http://fancyapps.com/fancybox/3/ Note I updated the comment above about that... |
I just tried this and it still closes on single click, not double click...
And another thing ;) you see under beforeClose I use a function to destroy video players. I opened another issue about this that it removes the whole thing before the fancybox actually is fully closed making the content jump. It works but is not super pretty. Did you add the onDeactivate as a state inbetween beforeClose and afterClose? The problem I have is that my disposeVideo() function is only working in beforeClose(), not onDeactivate() or afterClose(). It's like it's too late to run the function in those stages. |
I recreated a "Confirm dialog" demo here - https://codepen.io/fancyapps/pen/PmpePO - works fine. Even double-click to close. One undocumented (sorry about that) feature is that each slide receives "onReset" event before content is removed from it. The reason this event was created is that iframes on IE need a special care. But you can use it for your purposes. |
Aha, it was the current that needed to be in there. Works now! I wish I was just a tiny bit better at JS :) The doubleclick only works if touch is not set to false. With touch set to true it works. Any way to fix? For the confirm not showing up behind my other fancybox I hacked it this way hehe:
Any other ideas of controlling multiple boxes and where they're positioned? I'll try the onReset and hash next... |
onReset and I also tried onComplete didn't work. When I close the fancybox I need to remove all video elements, otherwise my videplayer script wont work when I open it up again. The only one working so far is beforeClose() with the drawback of it being removed visually before the fancybox is removed. I also tried this but it didn't work so I guess it's super time sensitive when to execute it.
My function for reference:
Sorry I'm throwing all kinds of things in here now. I'll try to stick to topic. |
Callbacks have been changed:
But afterLoad: function( instance, slide) {
... do your stuff here - create video, etc ...
slide.$slide.one( 'onReset', function () {
... probably stop or remove video here ...
});
}); |
btw, I have fixed the code - click / double click now works as expected. |
Oh great! Works, just tried! Hm, my script removes all videos so I can't do it afterLoad, I need to do it when I'm closing out of the box. Do you mind explaining the hash one more time please? I tried this Or is it meant to be: |
I`m sorry, my bad. I forgot that option hash means the first part, not the whole value of "actual" hash. E.g., you can change "myHash" in "url.html#myHash-1" and not the "-1" part, it is always the "-" followed by the index. I`ll think about it later, sorry. |
No worries, it's just a nice bonus if it's possible :) |
Last thing for now, do you also have an update of the Morphing Window Overlay here: http://fancyapps.com/fancybox/3/ It loads the background, but no content or close button shows up for me.
|
The layout has been changed a bit. To make it work, replace |
Great, thanks! I don't remember if it did this before but I have more text than what fits in the morphing window and when opening it up I'm scrolled down at the bottom by default. Not a huge deal, but is it possible to start at the top of the text instead? I don't know if this is fancybox or something else I have going on. |
@fancyapps - where to get v3.1 preview build? |
@Cu8eeeR Here https://codepen.io/fancyapps/pen/ybgpzy |
@seabasss maybe because it focuses on the button at the bottom? (try to set |
@fancyapps Awesome! autoFocus fixed it, and the Safari error is gone! Thanks |
Is the close animation speed a bit slower in 3.1? Can I change that back to what it was in 3.0 with a parameter? |
hi all, i think Thumbnails button should be down state when thumbnails showing |
You can find "Morphing modal overlay" code here - http://codepen.io/fancyapps/pen/rmwyXN You can change animation speed using @Cu8eeeR code is now available here - https://github.com/fancyapps/fancybox/tree/3.1 |
@fancyapps Always an answer to everything :) Thanks |
Thank you! I will try and let you know if anything |
But instead of this
Works like this:
Internationalization also does not work! That is my config:
Thanks! |
@7iomka Hi, I tried to recreate your issues, but works fine for me - http://codepen.io/anon/pen/KmZxyM?editors=1010 Maybe it works using the latest version (currently 3.1.3). |
Thank you! ...
Now:
It would be nice to read about it somewhere! )) |
@7iomka If I understand you correctly, then you are looking for event delegation feature and that has been implemented just now (v3.1.5). So, instead of initializing the plugin like this:
you have to pass selector as an option: $().fancybox({
selector : '[data-fancybox="images"]',
thumbs : false,
hash : false
}); fancyBox v2 used to do this automatically, but it is no longer possible, because this feature https://api.jquery.com/selector/ was removed from jQuery 3. |
Oh, this progress!!))
Did I understand you correctly that jQuery 3 is required for optimal work of the latest version of fancyBox? I'm using jquery 2.2.4) |
@7iomka It is always best to use the latest version of any software (less bugs, faster, etc), but minimum version required for fancyBox is jQuery v1.9.1. I would suggest you to create multiple sizes for each photo (as there is no sense to load, for example, 4320px X 3240px image on mobile phone) and then use "srcset" to load appropriate image depending on screen size. |
Also, tell me please, if i set
it is possible to prevent fadeOut effect of current slide if i click on the arrows? I need only slide effect, that is, make it work just like if I moved photos with touches! |
@7iomka You can try something like this: .fancybox-fx-slide.fancybox-slide--previous,
.fancybox-fx-slide.fancybox-slide--next {
opacity: 0;
} or you can simply create your own effect: .fancybox-fx-NAME.fancybox-slide--previous {
/* start properties for upcoming slide if user navigates to previous gallery item */
}
.fancybox-fx-NAME.fancybox-slide--next {
/* start properties for upcoming slide if user navigates to next gallery item */
}
.fancybox-fx-NAME.fancybox-slide--current {
/* final properties */
} |
Awesome! Thanks! |
Tell me please, what am I doing?
However, as you can see the picture is uploaded to the resolution of 1600px.
My question to you is: can I somehow interpret the loading of the desired images based on the media-query? I have a 5.5 inch smartphone but with full-hd resolution, because now it loads a large image, but viewport does not require this quality, and my task is to provide more speed (opening a gallery) for clients with a weak 2g Internet, rather than provide them decent image quality. If you have thoughts on this matter, I will be grateful for your recommendations! Thanks in advance! |
<a data-fancybox="gallery"
data-srcset="large.jpg 2048w, small.jpg 1024w"
data-width="2048"
data-height="1365"
data-caption=""
href="large.jpg"></a> Because it is (unfortunately) not possible to determine what to load without parsing the HTML and calculating right source manually. |
Ok, thanks for answer! |
FYI, v3.1 is now published. |
Hi, |
Hey!
3.1 looks awesome! Maybe you know about some of these things already but if not, here are some messages I get:
The text was updated successfully, but these errors were encountered: