mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-03-16 22:10:27 +00:00
prevent ripple from being created multiple times in parent
This commit is contained in:
parent
ec1f050d80
commit
e9261b8732
1 changed files with 11 additions and 6 deletions
|
|
@ -188,13 +188,18 @@
|
|||
this.parentElement = this.getClosestPositionedParent(this.$el.parentNode);
|
||||
this.previous = ['mouse'];
|
||||
|
||||
if (!this.parentElement) {
|
||||
this.$destroy();
|
||||
} else {
|
||||
if (this.parentElement) {
|
||||
this.rippleElement.parentNode.removeChild(this.rippleElement);
|
||||
this.parentElement.appendChild(this.rippleElement);
|
||||
this.registerTriggerEvent();
|
||||
this.setDimensions();
|
||||
|
||||
if (this.parentElement.querySelectorAll('.md-ink-ripple').length > 0) {
|
||||
this.$destroy();
|
||||
} else {
|
||||
this.parentElement.appendChild(this.rippleElement);
|
||||
this.registerTriggerEvent();
|
||||
this.setDimensions();
|
||||
}
|
||||
} else {
|
||||
this.$destroy();
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue