1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00
OpenSTF/res/app/components/stf/angular-draggabilly/angular-draggabilly-directive.js
Gunther Brunner 00eb155ab9 Created Packery and Draggabilly directives.
Applied the Packery directive to Info layout based on media queries.
2014-05-26 21:05:54 +09:00

16 lines
426 B
JavaScript

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