Skip to content

Commit

Permalink
refactor(ripple): refactor ubounded ripples as per MDCWeb 0.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stasson committed Feb 24, 2018
1 parent 0db8ad6 commit efca3c4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 44 deletions.
12 changes: 0 additions & 12 deletions components/card/mdc-card-action-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ export default {
mounted () {
this.ripple = new RippleBase(this,{
isUnbounded: () => true,
computeBoundingRect: () => {
const dim = 48
const {left, top} = this.$el.getBoundingClientRect()
return {
left,
top,
width: dim,
height: dim,
right: left + dim,
bottom: left + dim
}
}
})
this.ripple.init()
},
Expand Down
11 changes: 1 addition & 10 deletions components/checkbox/mdc-checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,7 @@ export default {
this.$refs.control.addEventListener(evt, handler)
},
computeBoundingRect: () => {
const {left, top} = this.$refs.root.getBoundingClientRect()
const DIM = 40
return {
top,
left,
right: left + DIM,
bottom: top + DIM,
width: DIM,
height: DIM
}
return this.$refs.root.getBoundingClientRect()
}
})
Expand Down
12 changes: 0 additions & 12 deletions components/icon-toggle/mdc-icon-toggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ export default {
this.ripple = new RippleBase(this, {
isUnbounded: () => true,
isSurfaceActive: () => this.foundation.isKeyboardActivated(),
computeBoundingRect: () => {
const dim = 48
const {left, top} = this.$el.getBoundingClientRect()
return {
left,
top,
width: dim,
height: dim,
right: left + dim,
bottom: left + dim
}
}
})
this.ripple.init()
},
Expand Down
11 changes: 1 addition & 10 deletions components/radio/mdc-radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,7 @@ export default {
this.$refs.control.removeEventListener(evt, handler)
},
computeBoundingRect: () => {
const {left, top} = this.$refs.root.getBoundingClientRect()
const DIM = 40
return {
top,
left,
right: left + DIM,
bottom: top + DIM,
width: DIM,
height: DIM
}
return this.$refs.root.getBoundingClientRect()
}
})
Expand Down

0 comments on commit efca3c4

Please sign in to comment.