Skip to content

Commit

Permalink
fix ember-views.dispatching-modify-property deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Remko Boschker committed May 11, 2016
1 parent 1735390 commit 3aab488
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addon/components/draggable-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ export default Ember.Component.extend({
return null;
}
}),
init: function() {
if (this.get('dragHandle')) {
this.set('dragReady', false);
}
this._super.apply(this, arguments);
},
didInsertElement: function() {
let self = this;
//if there is a drag handle watch the mouse up and down events to trigger if drag is allowed
if (this.get('dragHandle')) {
//only start when drag handle is activated
if (this.$(this.get('dragHandle'))) {
this.set('dragReady', false);
this.$(this.get('dragHandle')).on('mouseover', function(){
self.set('dragReady', true);
});
Expand Down

0 comments on commit 3aab488

Please sign in to comment.