Comments (15)
Hi,
I was thinking about that feature at the beginning, but then it came to
my mind that I'd need some kind of overlay over the image, what could
prevent right-click mouse actions like 'save image as', so I gave up
that idea.
Regarding the arrows, it's impossible with CSS as they're hardcoded as
SVG in the .js file. Of course you can always change the color by
modifying that file, but I'll think about a new options' field in a
future release.
On 18-Apr-15 6:30 PM, bakman2 wrote:
As subject, is this possible somehow ?
Maybe also nice to make it possible to change the arrow colors via
options or css.—
Reply to this email directly or view it on GitHub
#23.
from baguettebox.js.
I am trying to fix it myself for the click.
I have added:
bind(overlay, 'click', function(event) {
showNextImage();
});
This works, except when using touch outside the overlay, it will exit the lightbox while going to the next image.
from baguettebox.js.
fix:
bind(overlay, 'click', function(event) {
if(event.target && event.target.nodeName !== 'IMG' && event.target.nodeName !== 'FIGCAPTION'){
hideOverlay();
}
else{
showNextImage();
}
});
from baguettebox.js.
I see, but this works only for moving forward. It's more common when you have the image divided into two-clickable areas.
Anyway I don't see the need for that in this script, but feel free to use it yourself.
Regards
from baguettebox.js.
agreed. it works for me.
btw in Safari on OSX 10.10 the gallery behaves quite slow and stutters, would could be the cause of this ?
from baguettebox.js.
Example: www.richardbakker.com
from baguettebox.js.
hmm hard to say, unfortunately I don't have access to OSX to test that. If it happens only on Safari, you could check out older / newer versions. The animations are based on CSS transitions, so it may be some rendering engine problem.
from baguettebox.js.
It happens on chrome as well albeit a little better.
from baguettebox.js.
That's strange, but there's not much I can do right now.
from baguettebox.js.
Strange indeed. It appears to be caused by the loading-spinner.
I have commented it out and it works perfectly now:
// figure.innerHTML = '<div class="spinner">' +
// '<div class="double-bounce1"></div>' +
// '<div class="double-bounce2"></div>' +
// '</div>';
// var spinner = document.querySelector('#baguette-img-' + index + ' .spinner');
// figure.removeChild(spinner);
from baguettebox.js.
Ok, I see, so it looks like the rendering engine can't hold it all. Strange as the spinner is a simple css animation.
I hope that's a temporary problem, because the only solution as you've noticed is to remove it entirely.
from baguettebox.js.
I suspect it is not the animation, but creating/removing elements is quite expensive DOM manipulation.
from baguettebox.js.
Any ideas how to optimize it? Considering that each image has its own loading spinner.
from baguettebox.js.
Does the stuttering still occur on OSX?
Regarding the colors changing via options, I've been thinking about a possible solution, but unfortunately there isn't any reasonable one as it relies on css and :hover.
from baguettebox.js.
@bakman2 can I close this issue? Couldn't be reproduced.
from baguettebox.js.
Related Issues (20)
- baguetteBox as a WordPress Plugin for the Block Editor Gallery Block HOT 3
- Managing images HOT 1
- Suggestion: Adjust default styling for figcaption
- Upgrading to Gulp v4 HOT 1
- [Feature] Adding (very) basic theming support HOT 2
- Replace SVG arrows and close button with JPG HOT 1
- About the fact that it is Object when uploading a single file with the multiple file option HOT 1
- Question/Suggestion: Span gallery over more then one div HOT 1
- User Options lost when calling baguetteBox.show(index, gallery[0])
- fit image to #baguetteBox-overlay .full-image instead of using "data-at-xxxx"
- Filter in the gallery HOT 1
- (TIP) CSS to make figcaption responsive
- Dedicated download button
- TypeError: undefined is not an object – gallery.length on undefined in show() function HOT 1
- Support for <picture> based alternative file formats
- Add support for triggering baguetteBox when user double clicked images HOT 1
- Not allowed to navigate top frame to data URL HOT 1
- Allow other elements than <a> to trigger the overlay HOT 1
- Doesn't work on Android devices anymore HOT 2
- problem to access images in wordpress HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baguettebox.js.