Skip to content

Commit

Permalink
fix(framework-examples): Fix VueJS snackbar example (#410)
Browse files Browse the repository at this point in the history
Resolves #405
  • Loading branch information
pgbross authored and traviskaufman committed Mar 20, 2017
1 parent 2cc3432 commit a1a91ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions framework-examples/vue/src/v-mdc-snackbar/Snackbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

<script lang="babel">
import { MDCSnackbarFoundation } from '@material/snackbar';
const { TRANS_END_EVENT_NAME } = MDCSnackbarFoundation.strings;
import { getCorrectEventName } from '@material/animation';
export default {
props: {
Expand Down Expand Up @@ -72,10 +71,10 @@ export default {
}
},
registerTransitionEndHandler (handler) {
vm.$refs.root.addEventListener(TRANS_END_EVENT_NAME, handler);
vm.$refs.root.addEventListener(getCorrectEventName(window, 'transitionend'), handler);
},
deregisterTransitionEndHandler (handler) {
vm.$refs.root.removeEventListener(TRANS_END_EVENT_NAME, handler);
vm.$refs.root.removeEventListener(getCorrectEventName(window, 'transitionend'), handler);
}
});
this.foundation.init();
Expand Down

0 comments on commit a1a91ac

Please sign in to comment.