Skip to content

Commit 02ce39e

Browse files
committed
Release v2.1.0
1 parent 2d3fc5e commit 02ce39e

11 files changed

+862
-231
lines changed

README.md

+42-24
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`ABigImage` is jQuery plugin for viewing big versions of images.
44

5-
Current version **2.0.1** (2016-06-07).
5+
Current version **2.1.0** (2017-01-15).
66

77
<div class="colr">
88
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
@@ -13,23 +13,24 @@ Current version **2.0.1** (2016-06-07).
1313
</form>
1414
</div>
1515

16-
* [abigimage.jquery.js](abigimage.jquery.js) (16.2 kB) [min](abigimage.jquery.min.js) (6.7 kB, gzipped 2.5 kB)
17-
* [abigimage.jquery.css](abigimage.jquery.css) (2.6 kB) [min](abigimage.jquery.min.css) (1.5 kB, gzipped 550 bytes)
16+
* [abigimage.jquery.js](abigimage.jquery.js) (26.9 kB) [min](abigimage.jquery.min.js) (10.2 kB, gzipped 3.6 kB)
17+
* [abigimage.jquery.css](abigimage.jquery.css) (6 kB) [min](abigimage.jquery.min.css) (3.1 kB, gzipped 802 bytes)
1818
* Fork at [Github](https://github.com/makryl/ABigImage)
1919

2020
## Features
2121

2222
- Fit mobile devices.
2323
- Uses CSS3 transform and transition for smooth touch sliding.
2424
- Touch slide left or right opens next or previous image, touch slide up or down closes image.
25-
- Multi-touch and double-tap zoom.
25+
- Multi-touch and double-tap zoom, zoom out closes image.
2626
- Clicking image opens next one, clicking left side opens previous, clicking right side closes image.
2727
- Hotkeys for next, previous and close buttons.
2828
- Closing after viewing of all images.
2929
- Preloading of next and previous images.
30+
- Images counter.
3031
- Uses link's `href` or `data-href` attribute for large images.
3132
- Fully customizable styles.
32-
- Customizable bottom area.
33+
- Customizable, scrolling down bottom area.
3334
- Customizable `onopen` and `onclose` event.
3435

3536
<!-- Example -->
@@ -66,19 +67,23 @@ $(function(){
6667

6768
### Options
6869

69-
- `fadeIn` - fade in duration or [options](http://api.jquery.com/fadein/) (default: `fast`).
70-
- `fadeOut` - fade out duration or [options](http://api.jquery.com/fadeout/) (default: `fast`).
70+
- `duration` - effects duration (default: `200`).
7171
- `slideWidth` - slide width to switch or close image (between 0 and 1, default: 0.4).
7272
- `slideVelocity` - slide velocity to switch or close image (pixels per millisecond, default: 0.4).
7373
- `zoomMin` - minimal zoom that will hold (default: 1.5).
7474
- `zoomMax` - maximal zoom (default: 5).
75-
- `zoomScrollMultiplier` - how much zoom on mouse scroll (default: 1.25).
75+
- `zoomClose` - zoom that will close image (default: 0.9).
76+
- `zoomMoveViewport` - area for mouse moving when zoomed (default: 0.9).
77+
- `zoomVelocity` - zoom velocity on scroll or press button (pixels per millisecond, default: .04).
7678
- `doubleTapInterval` - zoom double-tap interval (milliseconds, default: 400).
7779
- `prevBtnHtml` - html of "previous" button (default: `&larr;`).
78-
- `closeBtnHtml` - html of "close" button (default: `x`).
80+
- `nextBtnHtml` - html of "next" button (default: `&rarr;`).
81+
- `zoomInBtnHtml` - html of "zoom in" button (default: `&plus;`).
82+
- `zoomOutBtnHtml` - html of "zoom out" button (default: `&minus;`).
83+
- `closeBtnHtml` - html of "close" button (default: `&times;`).
7984
- `keyNext` - hotkeys for "next" button (default: 13 enter, 32 space, 39 right, 40 down).
8085
- `keyPrev` - hotkeys for "previous" button (default: 8 backspace, 37 left, 38 up).
81-
- `keyNext` - hotkeys for "close" button (default: 27 escape, 35 end, 36 home).
86+
- `keyClose` - hotkeys for "close" button (default: 27 escape, 35 end, 36 home).
8287
- `onopen` - function called when image opens.
8388
- `onclose` - function called when image closes.
8489

@@ -87,18 +92,28 @@ To change styles use CSS classes of plugin's elements:
8792
```html
8893
<div class="abigimage-overlay"></div>
8994
<div class="abigimage-layout">
90-
<div class="abigimage-box">
91-
<!-- prevBtnBox (clickable behind the image, width 50%) -->
92-
<div class="abigimage-prevBtnBox"></div>
93-
<!-- closeBtnBox (clickable behind the image, width 50%) -->
94-
<div class="abigimage-closeBtnBox"></div>
95-
<img class="abigimage-img">
96-
<img class="abigimage-imgNext">
97-
<img class="abigimage-imgPrev">
95+
<div class="abigimage-wrapper">
96+
<div class="abigimage-box">
97+
<!-- prevBtnBox - clickable behind the image, width 50% -->
98+
<div class="abigimage-prevBtnBox"></div>
99+
<!-- closeBtnBox - clickable behind the image, width 50% -->
100+
<div class="abigimage-closeBtnBox"></div>
101+
<img class="abigimage-img">
102+
<img class="abigimage-imgNext">
103+
<img class="abigimage-imgPrev">
104+
</div>
105+
</div>
106+
<div class="abigimage-top">
107+
<div class="abigimage-prevBtn"><!-- prevBtnHtml --></div>
108+
<div class="abigimage-nextBtn"><!-- nextBtnHtml --></div>
109+
<div class="abigimage-counter"></div>
110+
<div class="abigimage-closeBtn"><!-- closeBtnHtml --></div>
111+
<div class="abigimage-zoomOutBtn"><!-- zoomOutBtnHtml --></div>
112+
<div class="abigimage-zoomInBtn"><!-- zoomInBtnHtml --></div>
113+
</div>
114+
<div class="abigimage-bottomBox">
115+
<div class="abigimage-bottom"></div>
98116
</div>
99-
<div class="abigimage-prevBtn"><!-- prevBtnHtml --></div>
100-
<div class="abigimage-closeBtn"><!-- closeBtnHtml --></div>
101-
<div class="abigimage-bottom"></div>
102117
</div>
103118
```
104119

@@ -110,7 +125,10 @@ Function, defined as `onopen` handler, executes in context of plugin, and receiv
110125
$('a[href$=".jpg"]').abigimage({
111126
onopen: function (target) {
112127
this.bottom.html(
113-
$('img', target).attr('alt')
128+
/* bottom caption */
129+
$('img', target).attr('alt') +
130+
/* custom bottom area */
131+
($('span', target).html() || '')
114132
);
115133
}
116134
});
@@ -168,8 +186,8 @@ $.abigimage.unbind($myimgs1);
168186
```
169187

170188
## Changes
171-
172-
- **2.1.0** - improved zoom positioning, added mouse scroll zoom, fixed prevention of non-plugin's hotkeys.
189+
190+
- **2.1.0** - improved animations for not fully loaded images, improved zoom positioning, added mouse scroll zoom, added scrolling down bottom area, added zoom out closing, added next and zoom buttons, added loading spinner, added images counter, fixed prevention of non-plugin's hotkeys.
173191
- **2.0.0** - fixed multiple plugin instances context, added double-tap zoom, optimized touch event handlers, styles moved to CSS file, license changed to MIT.
174192
- **1.3.1** - fixed image caching, added `unbind` method.
175193

0 commit comments

Comments
 (0)