1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00
OpenSTF/res/app/components/stf/angular-draggabilly/angular-draggabilly-directive.js
2014-09-02 17:25:22 +09:00

18 lines
497 B
JavaScript

module.exports =
function angularDraggabillyDirective(DraggabillyService, $parse) {
return {
restrict: 'AE',
link: function (scope, element, attrs) {
var parsedAttrs = $parse(attrs.angularDraggabilly)()
if (typeof parsedAttrs !== 'object') {
parsedAttrs = {}
}
var options = angular.extend({
}, parsedAttrs)
/* jshint unused: false */
var draggie = new DraggabillyService(element[0], options)
}
}
}