mirror of
https://github.com/fengyuanchen/viewerjs.git
synced 2026-02-01 16:32:50 +00:00
parent
f56ae1013d
commit
fbfbedfaec
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## next
|
||||
|
||||
- Fix wrong click action when the target image is ignored by the `filter` option (#211)
|
||||
|
||||
## 1.2.1 (Oct 20, 2018)
|
||||
|
||||
- Improve viewer instance storage to avoid side effect.
|
||||
|
||||
@ -163,7 +163,8 @@ class Viewer {
|
||||
});
|
||||
} else {
|
||||
addListener(element, EVENT_CLICK, (this.onStart = ({ target }) => {
|
||||
if (target.tagName.toLowerCase() === 'img') {
|
||||
if (target.tagName.toLowerCase() === 'img'
|
||||
&& isFunction(options.filter) && options.filter.call(this, target)) {
|
||||
this.view(this.images.indexOf(target));
|
||||
}
|
||||
}));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user