Skip to content

Commit 125ebb4

Browse files
committedAug 8, 2017
fix(MdRipple): make ripple to be disabled globally
1 parent ccc7fe2 commit 125ebb4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed
 

‎src/components/MdRipple/MdRipple.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@mousedown.passive.stop="startRipple">
88
<slot />
99

10-
<transition name="md-ripple" appear @after-enter="clearWave" v-if="!mdDisabled">
10+
<transition name="md-ripple" @after-enter="clearWave" v-if="!isDisabled">
1111
<span class="md-ripple-wave" :class="waveClasses" :style="waveStyles" v-if="animating" ref="rippleWave" />
1212
</transition>
1313
</div>
@@ -30,9 +30,12 @@
3030
touchTimeout: null
3131
}),
3232
computed: {
33+
isDisabled () {
34+
return !this.$material.ripple || this.mdDisabled
35+
},
3336
rippleClasses () {
3437
return {
35-
'md-disabled': this.mdDisabled
38+
'md-disabled': this.isDisabled
3639
}
3740
},
3841
waveClasses () {
@@ -61,9 +64,9 @@
6164
}, 100)
6265
},
6366
async startRipple ($event) {
64-
const { eventType, mdDisabled, mdCentered } = this
67+
const { eventType, isDisabled, mdCentered } = this
6568
66-
if (!mdDisabled && (!eventType || eventType === $event.type)) {
69+
if (!isDisabled && (!eventType || eventType === $event.type)) {
6770
let rippleSize = this.getSize()
6871
let ripplePosition = null
6972

0 commit comments

Comments
 (0)