Skip to content

Commit

Permalink
Merge pull request #41 from tsekka/master
Browse files Browse the repository at this point in the history
remove $-prefix that can break legacy code on same site
  • Loading branch information
pmochine authored Dec 15, 2024
2 parents b06adca + 84e5939 commit 7796a5b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/resize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import throttle from '../lib/throttle';

/* eslint-disable no-underscore-dangle */
export default {
data() {
return {
Expand Down Expand Up @@ -31,7 +32,7 @@ export default {

},
methods: {
$_change_video_resolution() {
_change_video_resolution() {
this.width = this.$_innerWidth();
},
$_innerWidth() {
Expand All @@ -44,12 +45,13 @@ export default {

},
beforeMount() {
this.$_change_video_resolution();
this._change_video_resolution();
},
mounted() {
window.addEventListener('resize', throttle(this.$_change_video_resolution, 250));
window.addEventListener('resize', throttle(this._change_video_resolution, 250));
},
beforeUnmount() {
window.removeEventListener('resize', throttle(this.$_change_video_resolution, 250));
window.removeEventListener('resize', throttle(this._change_video_resolution, 250));
},
};
/* eslint-enable no-underscore-dangle */

0 comments on commit 7796a5b

Please sign in to comment.