Skip to content Skip to sidebar Skip to footer

Paper-ripple Mousedown Event Handler Downaction Override

Polymer 1.1 In paper ripple source code they have the mouseDown event handler: /** @param {Event=} event */ downAction: function(event) { var xCenter = this.containerMetric

Solution 1:

Most likely documentation assumes that one should add a listener, like

listeners: {
    'up' : 'upAction',
    'down' : 'downAction',
}

you still can override the methods, but that's probably not how ripple element was supposed to be used:

ready: function(){
   this.ripplesDownAction = this.$.ripple.downAction.bind(this.$.ripple);
   this.$.ripple.downAction = this.downAction.bind(this);
},

downAction: function(e) {
    console.log('sssssssssssssssssssssssss');
    this.ripplesDownAction();
}

Post a Comment for "Paper-ripple Mousedown Event Handler Downaction Override"