Skip to content

Commit 3ebc734

Browse files
committed
fix: don't load images in the list when hide the navbar
Close #451
1 parent fce2c5c commit 3ebc734

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## next
44

5-
- Add a new option: `initialCoverage` (#526).
5+
- Add a new option: `initialCoverage` (#314, #526).
6+
- Don't load images in the list when hide the navbar (#451).
67
- Support for providing pivot pointer coordinates to `zoom` and `zoomTo` methods (#202).
78
- Don't override the padding right of the body when the width of the scrollbar is zero (#197).
89
- Add keyboard support to playing view (#90).

src/js/methods.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
EVENT_CLICK,
1313
EVENT_ERROR,
1414
EVENT_HIDE,
15-
EVENT_KEY_DOWN,
1615
EVENT_LOAD,
1716
EVENT_MOVE,
1817
EVENT_MOVED,

src/js/render.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ export default {
9797
}
9898
});
9999

100-
img.src = src || url;
100+
if (options.navbar) {
101+
img.src = src || url;
102+
}
103+
101104
img.alt = alt;
102105
img.setAttribute('data-original-url', url || src);
103106
item.setAttribute('data-index', index);

0 commit comments

Comments
 (0)