Skip to content

Commit

Permalink
refactor: Use conditional template event
Browse files Browse the repository at this point in the history
  • Loading branch information
rkunev committed Jun 17, 2019
1 parent 06576f8 commit e301c9b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
class="rcp__rotator"
:style="{ 'pointer-events': disabled || isPressed || !isKnobIn ? 'none' : null }"
@dblclick.self="rotateToMouse"
v-on="mouseScroll ? { wheel: onScroll } : null"
ref="rotator"
>
<div class="rcp__knob" :class="isKnobIn ? 'in' : 'out'" @transitionend="hidePalette"></div>
Expand Down Expand Up @@ -89,10 +90,6 @@ export default {
},
},
mounted() {
if (this.mouseScroll) {
this.$refs.rotator.addEventListener('wheel', this.onScroll);
}
// ignore testing code that will be removed by dead code elimination for production
/* istanbul ignore next */
if (process.env.NODE_ENV === 'development' && this.initiallyCollapsed && this.variant === 'persistent') {
Expand Down

0 comments on commit e301c9b

Please sign in to comment.