Skip to content

Commit

Permalink
Decorating during idle as well as trying in mouseEnter if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
MeoMix committed May 8, 2015
1 parent 27023fb commit 279764a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/js/foreground/view/behavior/sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@
'mouseenter': '_onMouseEnter'
},

initialize: function() {
this.listenTo(Streamus.channels.foregroundArea.vent, 'idle', this._onForegroundAreaIdle);
},

_onForegroundAreaIdle: function() {
this._decorate();
},

_onMouseEnter: function () {
this._decorate();
},

_decorate: function() {
// There's no reason to take this perf hit unless the user is actually going to use sortable logic.
// So, only run it once the user could potentially need to do so.
if (!this.isDecorated) {
Expand Down

0 comments on commit 279764a

Please sign in to comment.