Skip to content

Commit

Permalink
Refactor resizable directive
Browse files Browse the repository at this point in the history
  • Loading branch information
LFDM committed May 23, 2014
1 parent 0120f9c commit 844b69d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/js/arethusa.core/directives/resizable.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ angular.module('arethusa.core').directive('resizable', function($window, $docume
$document.on('mouseup', mouseup);
});


var mousemove = function(event) {
function mousemove(event) {
var x = event.pageX;
var el = element.parent();
var leftPos = el.position().left;
Expand All @@ -24,12 +23,12 @@ angular.module('arethusa.core').directive('resizable', function($window, $docume
var newSize = el.width() - diff;
el.width(newSize);
main.width(main.width() + diff);
};
}

var mouseup = function() {
function mouseup() {
$document.unbind('mousemove', mousemove);
$document.unbind('mouseup', mouseup);
};
}
}
};

Expand Down

0 comments on commit 844b69d

Please sign in to comment.