Skip to content

Commit

Permalink
Merge pull request #37 from curit/master
Browse files Browse the repository at this point in the history
fix ember-views.dispatching-modify-property deprecation
  • Loading branch information
dgavey committed May 11, 2016
2 parents 1735390 + 3aab488 commit eb26d28
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 eb26d28

Please sign in to comment.