1 | ## [1.0.6](https://github.com/francoischalifour/medium-zoom/compare/1.0.5...1.0.6) (2020-07-08)
|
2 |
|
3 | ### Bug Fixes
|
4 |
|
5 | - support lazy loading images on Firefox ([#158](https://github.com/francoischalifour/medium-zoom/issues/158)) ([aebb316](https://github.com/francoischalifour/medium-zoom/commit/aebb31636cb9e87f3a9b25f8bd0007f0269c1ae7))
|
6 |
|
7 | ## [1.0.5](https://github.com/francoischalifour/medium-zoom/compare/1.0.4...1.0.5) (2019-12-07)
|
8 |
|
9 | ### Fixed
|
10 |
|
11 | - Give zoom transition higher priority ([#148](https://github.com/francoischalifour/medium-zoom/issues/148)) ([25b3524](https://github.com/francoischalifour/medium-zoom/commit/25b3524bb76e19a5e8dc46e32cadca3db7fedbef)), closes [#110](https://github.com/francoischalifour/medium-zoom/issues/110)
|
12 |
|
13 | ## [1.0.4](https://github.com/francoischalifour/medium-zoom/compare/1.0.3...1.0.4) (2019-04-06)
|
14 |
|
15 | ### Fixed
|
16 |
|
17 | - Bring SSR compatibility by not using window outside of main function ([#95](https://github.com/francoischalifour/medium-zoom/issues/95)) ([541e8f0](https://github.com/francoischalifour/medium-zoom/commit/541e8f0f9fb06cf9c72bb92541b87a5153a15d18)), closes [#94](https://github.com/francoischalifour/medium-zoom/issues/94)
|
18 |
|
19 | ## [1.0.3](https://github.com/francoischalifour/medium-zoom/compare/1.0.2...1.0.3) (2019-01-20)
|
20 |
|
21 | ### Changed
|
22 |
|
23 | - Export default export type as ESM module ([#82](https://github.com/francoischalifour/medium-zoom/issues/82)) ([ed45fcb](https://github.com/francoischalifour/medium-zoom/commit/ed45fcbe0ae318f70411d8975c0c557ccf81f92b))
|
24 |
|
25 | ### Fixed
|
26 |
|
27 | - Use document viewport size ([#78](https://github.com/francoischalifour/medium-zoom/issues/78)) ([9a06f9b](https://github.com/francoischalifour/medium-zoom/commit/9a06f9b41d644b3d8b17c0782518036620f31a11)), closes [#75](https://github.com/francoischalifour/medium-zoom/issues/75)
|
28 | - Improve type definitions ([#85](https://github.com/francoischalifour/medium-zoom/issues/85)) ([702a767](https://github.com/francoischalifour/medium-zoom/commit/702a7670fa8f5a680c5d0abd1f2ea308f97ad395))
|
29 |
|
30 | ## [1.0.2](https://github.com/francoischalifour/medium-zoom/compare/1.0.1...1.0.2) (2018-09-05)
|
31 |
|
32 | ### Added
|
33 |
|
34 | - Improve TypeScript definition (#73)
|
35 |
|
36 | ## [1.0.1](https://github.com/francoischalifour/medium-zoom/compare/1.0.0...1.0.1) (2018-08-29)
|
37 |
|
38 | ### Fixed
|
39 |
|
40 | - Don't prevent behavior of all clicks ([#72](https://github.com/francoischalifour/medium-zoom/issues/72)) ([71eebf9](https://github.com/francoischalifour/medium-zoom/commit/71eebf90f09a81c013731871b8cab92a4243a557)), closes [#71](https://github.com/francoischalifour/medium-zoom/issues/71)
|
41 |
|
42 | # [1.0.0](https://github.com/francoischalifour/medium-zoom/compare/v0.4.0...1.0.0) (2018-08-28)
|
43 |
|
44 | ### Added
|
45 |
|
46 | - **Methods become chainable**. All methods except getters and animation methods (`open()`, `close()` and `toggle()`) return the zoom object to allow method calls to be chained.
|
47 |
|
48 | ```js
|
49 | const zoom = mediumZoom()
|
50 |
|
51 | zoom
|
52 | .attach('#image-1', '#image-2')
|
53 | .on('open', () => zoom.update({ background: 'yellow' }))
|
54 | .open()
|
55 | ```
|
56 |
|
57 | - **Animation methods return promises**. `open()`, `close()` and `toggle()` return promises resolving with the zoom for acting accordingly when the animation is completed. To remain compatible with IE10, promises are converted to no-operation functions if unavailable.
|
58 |
|
59 | ```js
|
60 | const zoom = mediumZoom('[data-zoom]')
|
61 |
|
62 | zoom.open().then(() => zoom.update({ background: 'yellow' }))
|
63 | ```
|
64 |
|
65 | - **Options**
|
66 |
|
67 | - `background` supports the [`background` CSS property](https://developer.mozilla.org/en-US/docs/Web/CSS/background) (not only `background-color`)
|
68 |
|
69 | - **Methods**
|
70 |
|
71 | - `attach(...selectors: string[]|Element[]|NodeList[]|Array[]) => Zoom`
|
72 | - `clone(options?: object) => Zoom`
|
73 | - `getOptions() => object`
|
74 | - `getImages() => Element[]`
|
75 | - `getZoomedImage() => Element`
|
76 |
|
77 | - **Events**
|
78 |
|
79 | - "update" is fired when the `update` method is called
|
80 |
|
81 | - Add **TypeScript definitions**
|
82 |
|
83 | - Improve **documentation**
|
84 |
|
85 | ### Fixed
|
86 |
|
87 | - HD image scales the first time on Firefox (264c81f9d54b7272fa260616f117c3149be89123)
|
88 | - Support `srcset` attribute (#51)
|
89 | - Support SVG sources (#56)
|
90 |
|
91 | ### Breaking changes
|
92 |
|
93 | - **Imports**. If you're using CommonJS, you'll need to change the require statement:
|
94 |
|
95 | ```diff
|
96 | - const mediumZoom = require('medium-zoom')
|
97 | + const mediumZoom = require('medium-zoom').default
|
98 | ```
|
99 |
|
100 | - **No images selected by default**. Prior to version 1, all scaled images (via HTML or CSS properties) were added to the zoom when calling `mediumZoom()`. Now, calling `mediumZoom()` without selector does not attach any images to the zoom. This change is necessary for having a more predictable behavior and a more composable API.
|
101 |
|
102 | - **Options**
|
103 |
|
104 | - `metaClick` was removed
|
105 |
|
106 | - **Methods**
|
107 |
|
108 | - `show() => void` → `open({ target?: Element }) => Promise<Zoom>`
|
109 | - `hide() => void` → `close() => Promise<Zoom>`
|
110 | - `toggle() => void` → `toggle({ target?: Element }) => Promise<Zoom>`
|
111 | - `detach() => void` → `detach(...selectors: string[]|Element[]|NodeList[]|Array[]) => Zoom`
|
112 | - `update(options: object) => void` → `update(options: object) => Zoom`
|
113 | - `addEventListeners(type: string, listener: Function) => void` → `on(type: string, listener: Function, options?: object) => Zoom`
|
114 | - `removeEventListeners(type: string, listener: Function) => void` → `off(type: string, listener: Function, options?: object) => Zoom`
|
115 |
|
116 | - **Attributes**
|
117 |
|
118 | - `data-zoom-target` → `data-zoom-src`
|
119 |
|
120 | - **Events**
|
121 | - "show" → "open"
|
122 | - "shown" → "opened"
|
123 | - "hide" → "close"
|
124 | - "hidden" → "closed"
|
125 |
|
126 | # [0.4.0](https://github.com/francoischalifour/medium-zoom/compare/v0.3.0...v0.4.0) (2018-03-09)
|
127 |
|
128 | ### Added
|
129 |
|
130 | - Support for IE ([#35](https://github.com/francoischalifour/medium-zoom/issues/35)) ([bd485fc](https://github.com/francoischalifour/medium-zoom/commit/bd485fc0416b4d3f8d7d1b6fd4e523f42ca2d8d8)), closes [#34](https://github.com/francoischalifour/medium-zoom/issues/34)
|
131 |
|
132 | ### Fixed
|
133 |
|
134 | - Calling `.detach()` when having a zoomed image: 9fa798d3fe96ae7060f316995b84eaacf3ce8a11
|
135 |
|
136 | # [0.3.0](https://github.com/francoischalifour/medium-zoom/compare/v0.2.0...v0.3.0) (2017-12-07)
|
137 |
|
138 | ### Added
|
139 |
|
140 | - Add support for `template`s and `container`s: d0d1ec141ffe744d059dddcfc08b6e830b7c17c9
|
141 |
|
142 | # [0.2.0](https://github.com/francoischalifour/medium-zoom/compare/v0.1.8...v0.2.0) (2017-10-01)
|
143 |
|
144 | ### Added
|
145 |
|
146 | - Add HD support: 1db9607dce2aa348d9be465208395d125b16e728
|
147 |
|
148 | ### Changed
|
149 |
|
150 | - Rewrite core implementation: 5158cace958acee0e89a4c9358704ed504756254
|
151 | - Update library description: a6f424bae2da534563154c26b49046367d7db215
|
152 | - Use less restrictive CSS rules: acaeba4bf96576b65867c3effc2710bd9d029dc0
|
153 | - Reduce latency on click to unzoom: 3c4c2fef2c2fca2ce542e57e13ce3198fe7ba2bb
|
154 |
|
155 | ### Fixed
|
156 |
|
157 | - Fix `hide` event being thrown multiple times on scroll: 3c4c2fef2c2fca2ce542e57e13ce3198fe7ba2bb
|
158 |
|
159 | ## [0.1.8](https://github.com/francoischalifour/medium-zoom/compare/v0.1.7...v0.1.8) (2017-09-17)
|
160 |
|
161 | ### Fixed
|
162 |
|
163 | - Do not trigger the zoom when target is `null` (can happen on fast double click): 3f795b44877af341ed65ae7c1bc764cc5122cdfb
|
164 |
|
165 | ## [0.1.7](https://github.com/francoischalifour/medium-zoom/compare/v0.1.6...v0.1.7) (2017-07-21)
|
166 |
|
167 | ### Fixed
|
168 |
|
169 | - Don't ignore margin on floating images: 384f0b1576e66f16844e0482eb1653a0c9479ad2
|
170 |
|
171 | ## [0.1.6](https://github.com/francoischalifour/medium-zoom/compare/v0.1.5...v0.1.6) (2017-07-19)
|
172 |
|
173 | ### Fixed
|
174 |
|
175 | - Support `scrollTop` position on Firefox: ee13718c38a7a4ba486cacfb50f2861dd1adb8ad
|
176 |
|
177 | ## [0.1.5](https://github.com/francoischalifour/medium-zoom/compare/v0.1.4...v0.1.5) (2017-06-10)
|
178 |
|
179 | ### Changed
|
180 |
|
181 | - Wrong selector trows a `TypeError` instead of a `SyntaxError`: 38e6292ce83d1b54f4fd80cce03d737c3872a58f
|
182 | - Library now fully exported by webpack: 5c7944b5e2de19828c8f9298fdc7a03a9146e42b
|
183 | - Production version is used when importing the library: 3a7d8ebc0ddd2cb142ccb8519de6fc57e8e8ba3e
|
184 |
|
185 | ## [0.1.4](https://github.com/francoischalifour/medium-zoom/compare/v0.1.3...v0.1.4) (2017-05-31)
|
186 |
|
187 | ### Added
|
188 |
|
189 | - Support NodeLists, HTMLCollections and Nodes (#8): aa8ff0ff6743e0bc011ea162ff068a2ddbb0f9ab
|
190 |
|
191 | ### Changed
|
192 |
|
193 | - Apply the default selector only when the plugin is given none (#7): aa8ff0ff6743e0bc011ea162ff068a2ddbb0f9ab
|
194 |
|
195 | ## [0.1.3](https://github.com/francoischalifour/medium-zoom/compare/v0.1.2...v0.1.3) (2017-04-01)
|
196 |
|
197 | ### Fixed
|
198 |
|
199 | - Center image when the doctype is not declared (#4): 95be45a63837bcd282433728f8db8759bd5777cb
|
200 | - Ignore zero-pixel scroll offset: 3cd34640ab26b04b802ce39ce74f092180e3cb00
|
201 |
|
202 | ## [0.1.2](https://github.com/francoischalifour/medium-zoom/compare/v0.1.1...v0.1.2) (2017-03-04)
|
203 |
|
204 | ### Added
|
205 |
|
206 | - `.detach()` method that unsubscribe images from the zoom (#2): 2ceb5120ebc35bb457a08474e0d39430e253ab08
|
207 |
|
208 | ## [0.1.1](https://github.com/francoischalifour/medium-zoom/compare/v0.1.0...v0.1.1) (2016-10-06)
|
209 |
|
210 | ### Fixed
|
211 |
|
212 | - Export the plugin for npm usage (#1): affca211ac6999f1d2c554205d5b216c37fc7c1c
|
213 |
|
214 | # 0.1.0 (2016-07-28)
|
215 |
|
216 | Initial release.
|