Skip to content

Commit

Permalink
fix: Revert isolate internal eventbus. Use relatively unique event na…
Browse files Browse the repository at this point in the history
…me to isolate from user events.
  • Loading branch information
pgbross authored and pgbross committed Apr 25, 2018
1 parent aea2733 commit 97eceaf
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 57 deletions.
19 changes: 0 additions & 19 deletions components/common/event-bus.js

This file was deleted.

5 changes: 0 additions & 5 deletions components/common/index.js

This file was deleted.

11 changes: 0 additions & 11 deletions components/common/mdc-common.js

This file was deleted.

15 changes: 0 additions & 15 deletions components/common/unique-id.js

This file was deleted.

3 changes: 1 addition & 2 deletions components/drawer/mdc-drawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import mdcPermanentDrawer from './mdc-permanent-drawer.vue';
import mdcPersistentDrawer from './mdc-persistent-drawer.vue';
import mdcTemporaryDrawer from './mdc-temporary-drawer.vue';
import { eventBus } from '../common';
const media = new class {
get small() {
Expand Down Expand Up @@ -119,7 +118,7 @@ export default {
},
onChange(event) {
this.$emit('change', event);
eventBus.$emit('mdc:layout');
this.$root.$emit('_vma_:layout');
},
openDrawer() {
this.open_ = true;
Expand Down
2 changes: 0 additions & 2 deletions components/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//
// vue PlugIn
//
import VueMDCCommon from './common';
import VueMDCButton from './button';
import VueMDCCard from './card';
import VueMDCCheckbox from './checkbox';
Expand Down Expand Up @@ -34,7 +33,6 @@ import VueMDCTypography from './typography';
export default {
version: '__VERSION__',
install(vm) {
vm.use(VueMDCCommon);
vm.use(VueMDCButton);
vm.use(VueMDCCard);
vm.use(VueMDCCheckbox);
Expand Down
5 changes: 2 additions & 3 deletions components/slider/mdc-slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<script>
import MDCSliderFoundation from '@material/slider/foundation';
import { DispatchFocusMixin } from '../base';
import { eventBus } from '../common';
export default {
name: 'mdc-slider',
Expand Down Expand Up @@ -171,15 +170,15 @@ export default {
this.foundation.setupTrackMarker();
}
eventBus.$on('mdc:layout', this.layout);
this.$root.$on('_vma_:layout', this.layout);
if (this.layoutOn) {
this.layoutOnEventSource = this.layoutOnSource || this.$root;
this.layoutOnEventSource.$on(this.layoutOn, this.layout);
}
},
beforeDestroy() {
eventBus.$off('mdc:layout', this.layout);
this.$root.$off('_vma_:layout', this.layout);
if (this.layoutOnEventSource) {
this.layoutOnEventSource.$off(this.layoutOn, this.layout);
}
Expand Down

0 comments on commit 97eceaf

Please sign in to comment.