List of mouse events.
View Twiddle | Copy Twiddle | View Gist
Original idea of this README taken from @rwjblue
List of mouse events.
View Twiddle | Copy Twiddle | View Gist
Original idea of this README taken from @rwjblue
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
notification:[], | |
mouseEnter(){ | |
this.get('notification').pushObject('mouse have entered in the building'); | |
}, | |
mouseLeave(){ | |
this.get('notification').pushObject('mouse have left the building'); | |
}, | |
click(){ | |
this.get('notification').pushObject('mouse have clicked on me, yey!'); | |
}, | |
mouseDown(){ | |
this.get('notification').pushObject('mouse is pushing me!'); | |
}, | |
mouseUp(){ | |
this.get('notification').pushObject('mouse has realeased me!'); | |
}, | |
mouseMove(e){ | |
//use e.screenX, e.screenY | |
this.get('notification').pushObject('what a swing!'); | |
} | |
}); |
{ | |
"version": "0.4.13", | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.10/ember.debug.js", | |
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/1.13.13/ember-data.js", | |
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.10/ember-template-compiler.js" | |
} | |
} |