Skip to content

Commit b28a574

Browse files
Merge branch 'master' into improve_transitions_between_images
2 parents 605c18b + f90e8df commit b28a574

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/components/script.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,17 @@ export default {
119119
this.$set(this, 'beginThumbIndex', this.select - halfDown + mod)
120120
this.$set(this, 'thumbSelect', halfDown - mod)
121121
this.$set(this, 'displayThumbs', this.images.slice(this.select - halfDown + mod, this.select + halfDown + 1))
122-
}
122+
},
123+
124+
lightBoxOn(value) {
125+
if (document != null) {
126+
if (value) {
127+
document.getElementsByTagName('body')[0].classList.add('vue-lb-open')
128+
} else {
129+
document.getElementsByTagName('body')[0].classList.remove('vue-lb-open')
130+
}
131+
}
132+
},
123133
},
124134

125135
methods: {

src/components/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ img.vue-lb-modal-image {
220220
right: 10px;
221221
}
222222

223+
.vue-lb-open {
224+
overflow: hidden;
225+
}
226+
223227
@media (min-width: 500px) {
224228
.vue-lb-thumbnail-arrow {
225229
width: 40px;

0 commit comments

Comments
 (0)