This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("cropme", ["ngSanitize", "ngTouch"]).directive "cropme", ($swipe, $window, $timeout, $rootScope) -> | |
minHeight = 100 # if destinationHeight has not been defined, we need a default height for the crop zone | |
borderSensitivity = 8 # grab area size around the borders in pixels | |
checkScopeVariables = (scope) -> | |
if scope.destinationHeight | |
if scope.ratio | |
throw "You can't specify both destinationHeight and ratio, destinationHeight = destinationWidth * ratio" | |
else |