Skip to content

Commit f0e1c9b

Browse files
committed
build: release 1.11.5
1 parent 30e0582 commit f0e1c9b

12 files changed

+1376
-1160
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## next
3+
## 1.11.5 (Aug 26, 2023)
44

55
- Fix the issue of title blinking when opening the same image again (#609).
66

dist/viewer.common.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
/*!
2-
* Viewer.js v1.11.4
2+
* Viewer.js v1.11.5
33
* https://fengyuanchen.github.io/viewerjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2023-07-23T07:45:53.159Z
8+
* Date: 2023-08-26T07:33:16.755Z
99
*/
1010

1111
'use strict';
1212

13-
function ownKeys(object, enumerableOnly) {
14-
var keys = Object.keys(object);
13+
function ownKeys(e, r) {
14+
var t = Object.keys(e);
1515
if (Object.getOwnPropertySymbols) {
16-
var symbols = Object.getOwnPropertySymbols(object);
17-
enumerableOnly && (symbols = symbols.filter(function (sym) {
18-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
19-
})), keys.push.apply(keys, symbols);
16+
var o = Object.getOwnPropertySymbols(e);
17+
r && (o = o.filter(function (r) {
18+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
19+
})), t.push.apply(t, o);
2020
}
21-
return keys;
21+
return t;
2222
}
23-
function _objectSpread2(target) {
24-
for (var i = 1; i < arguments.length; i++) {
25-
var source = null != arguments[i] ? arguments[i] : {};
26-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
27-
_defineProperty(target, key, source[key]);
28-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
29-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
23+
function _objectSpread2(e) {
24+
for (var r = 1; r < arguments.length; r++) {
25+
var t = null != arguments[r] ? arguments[r] : {};
26+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
27+
_defineProperty(e, r, t[r]);
28+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
29+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
3030
});
3131
}
32-
return target;
32+
return e;
3333
}
34-
function _typeof(obj) {
34+
function _typeof(o) {
3535
"@babel/helpers - typeof";
3636

37-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
38-
return typeof obj;
39-
} : function (obj) {
40-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
41-
}, _typeof(obj);
37+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
38+
return typeof o;
39+
} : function (o) {
40+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
41+
}, _typeof(o);
4242
}
4343
function _classCallCheck(instance, Constructor) {
4444
if (!(instance instanceof Constructor)) {
@@ -1185,14 +1185,14 @@ var render = {
11851185
}
11861186
},
11871187
resetImage: function resetImage() {
1188-
// this.image only defined after viewed
1189-
if (this.viewing || this.viewed) {
1190-
var image = this.image;
1188+
var image = this.image;
1189+
if (image) {
11911190
if (this.viewing) {
11921191
this.viewing.abort();
11931192
}
11941193
image.parentNode.removeChild(image);
11951194
this.image = null;
1195+
this.title.innerHTML = '';
11961196
}
11971197
}
11981198
};
@@ -2804,9 +2804,6 @@ var others = {
28042804
if (options.fucus) {
28052805
this.clearEnforceFocus();
28062806
}
2807-
this.fulled = false;
2808-
this.viewed = false;
2809-
this.isShown = false;
28102807
this.close();
28112808
this.unbind();
28122809
addClass(viewer, CLASS_HIDE);
@@ -2816,6 +2813,9 @@ var others = {
28162813
viewer.setAttribute('aria-hidden', true);
28172814
this.resetList();
28182815
this.resetImage();
2816+
this.fulled = false;
2817+
this.viewed = false;
2818+
this.isShown = false;
28192819
this.hiding = false;
28202820
if (!this.destroyed) {
28212821
if (isFunction(options.hidden)) {

dist/viewer.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Viewer.js v1.11.4
2+
* Viewer.js v1.11.5
33
* https://fengyuanchen.github.io/viewerjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2023-07-23T07:45:51.236Z
8+
* Date: 2023-08-26T07:33:14.329Z
99
*/
1010

1111
.viewer-zoom-in::before, .viewer-zoom-out::before, .viewer-one-to-one::before, .viewer-reset::before, .viewer-prev::before, .viewer-play::before, .viewer-next::before, .viewer-rotate-left::before, .viewer-rotate-right::before, .viewer-flip-horizontal::before, .viewer-flip-vertical::before, .viewer-fullscreen::before, .viewer-fullscreen-exit::before, .viewer-close::before {

dist/viewer.esm.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
/*!
2-
* Viewer.js v1.11.4
2+
* Viewer.js v1.11.5
33
* https://fengyuanchen.github.io/viewerjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2023-07-23T07:45:53.159Z
8+
* Date: 2023-08-26T07:33:16.755Z
99
*/
1010

11-
function ownKeys(object, enumerableOnly) {
12-
var keys = Object.keys(object);
11+
function ownKeys(e, r) {
12+
var t = Object.keys(e);
1313
if (Object.getOwnPropertySymbols) {
14-
var symbols = Object.getOwnPropertySymbols(object);
15-
enumerableOnly && (symbols = symbols.filter(function (sym) {
16-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
17-
})), keys.push.apply(keys, symbols);
14+
var o = Object.getOwnPropertySymbols(e);
15+
r && (o = o.filter(function (r) {
16+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
17+
})), t.push.apply(t, o);
1818
}
19-
return keys;
19+
return t;
2020
}
21-
function _objectSpread2(target) {
22-
for (var i = 1; i < arguments.length; i++) {
23-
var source = null != arguments[i] ? arguments[i] : {};
24-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
25-
_defineProperty(target, key, source[key]);
26-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
27-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
21+
function _objectSpread2(e) {
22+
for (var r = 1; r < arguments.length; r++) {
23+
var t = null != arguments[r] ? arguments[r] : {};
24+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
25+
_defineProperty(e, r, t[r]);
26+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
27+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
2828
});
2929
}
30-
return target;
30+
return e;
3131
}
32-
function _typeof(obj) {
32+
function _typeof(o) {
3333
"@babel/helpers - typeof";
3434

35-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
36-
return typeof obj;
37-
} : function (obj) {
38-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
39-
}, _typeof(obj);
35+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
36+
return typeof o;
37+
} : function (o) {
38+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
39+
}, _typeof(o);
4040
}
4141
function _classCallCheck(instance, Constructor) {
4242
if (!(instance instanceof Constructor)) {
@@ -1183,14 +1183,14 @@ var render = {
11831183
}
11841184
},
11851185
resetImage: function resetImage() {
1186-
// this.image only defined after viewed
1187-
if (this.viewing || this.viewed) {
1188-
var image = this.image;
1186+
var image = this.image;
1187+
if (image) {
11891188
if (this.viewing) {
11901189
this.viewing.abort();
11911190
}
11921191
image.parentNode.removeChild(image);
11931192
this.image = null;
1193+
this.title.innerHTML = '';
11941194
}
11951195
}
11961196
};
@@ -2802,9 +2802,6 @@ var others = {
28022802
if (options.fucus) {
28032803
this.clearEnforceFocus();
28042804
}
2805-
this.fulled = false;
2806-
this.viewed = false;
2807-
this.isShown = false;
28082805
this.close();
28092806
this.unbind();
28102807
addClass(viewer, CLASS_HIDE);
@@ -2814,6 +2811,9 @@ var others = {
28142811
viewer.setAttribute('aria-hidden', true);
28152812
this.resetList();
28162813
this.resetImage();
2814+
this.fulled = false;
2815+
this.viewed = false;
2816+
this.isShown = false;
28172817
this.hiding = false;
28182818
if (!this.destroyed) {
28192819
if (isFunction(options.hidden)) {

dist/viewer.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Viewer.js v1.11.4
2+
* Viewer.js v1.11.5
33
* https://fengyuanchen.github.io/viewerjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2023-07-23T07:45:53.159Z
8+
* Date: 2023-08-26T07:33:16.755Z
99
*/
1010

1111
(function (global, factory) {
@@ -14,35 +14,35 @@
1414
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Viewer = factory());
1515
})(this, (function () { 'use strict';
1616

17-
function ownKeys(object, enumerableOnly) {
18-
var keys = Object.keys(object);
17+
function ownKeys(e, r) {
18+
var t = Object.keys(e);
1919
if (Object.getOwnPropertySymbols) {
20-
var symbols = Object.getOwnPropertySymbols(object);
21-
enumerableOnly && (symbols = symbols.filter(function (sym) {
22-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
23-
})), keys.push.apply(keys, symbols);
20+
var o = Object.getOwnPropertySymbols(e);
21+
r && (o = o.filter(function (r) {
22+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
23+
})), t.push.apply(t, o);
2424
}
25-
return keys;
25+
return t;
2626
}
27-
function _objectSpread2(target) {
28-
for (var i = 1; i < arguments.length; i++) {
29-
var source = null != arguments[i] ? arguments[i] : {};
30-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
31-
_defineProperty(target, key, source[key]);
32-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
33-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
27+
function _objectSpread2(e) {
28+
for (var r = 1; r < arguments.length; r++) {
29+
var t = null != arguments[r] ? arguments[r] : {};
30+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
31+
_defineProperty(e, r, t[r]);
32+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
33+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
3434
});
3535
}
36-
return target;
36+
return e;
3737
}
38-
function _typeof(obj) {
38+
function _typeof(o) {
3939
"@babel/helpers - typeof";
4040

41-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
42-
return typeof obj;
43-
} : function (obj) {
44-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
45-
}, _typeof(obj);
41+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
42+
return typeof o;
43+
} : function (o) {
44+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
45+
}, _typeof(o);
4646
}
4747
function _classCallCheck(instance, Constructor) {
4848
if (!(instance instanceof Constructor)) {
@@ -1189,14 +1189,14 @@
11891189
}
11901190
},
11911191
resetImage: function resetImage() {
1192-
// this.image only defined after viewed
1193-
if (this.viewing || this.viewed) {
1194-
var image = this.image;
1192+
var image = this.image;
1193+
if (image) {
11951194
if (this.viewing) {
11961195
this.viewing.abort();
11971196
}
11981197
image.parentNode.removeChild(image);
11991198
this.image = null;
1199+
this.title.innerHTML = '';
12001200
}
12011201
}
12021202
};
@@ -2808,9 +2808,6 @@
28082808
if (options.fucus) {
28092809
this.clearEnforceFocus();
28102810
}
2811-
this.fulled = false;
2812-
this.viewed = false;
2813-
this.isShown = false;
28142811
this.close();
28152812
this.unbind();
28162813
addClass(viewer, CLASS_HIDE);
@@ -2820,6 +2817,9 @@
28202817
viewer.setAttribute('aria-hidden', true);
28212818
this.resetList();
28222819
this.resetImage();
2820+
this.fulled = false;
2821+
this.viewed = false;
2822+
this.isShown = false;
28232823
this.hiding = false;
28242824
if (!this.destroyed) {
28252825
if (isFunction(options.hidden)) {

dist/viewer.min.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/viewer.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)