Showing 5 of 9 total issues
Function DropDirective
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function DropDirective($parse, sfDragNDropService) {
return {
restrict: 'A',
link: function($scope, element, attrs) {
// Keep a ref to the dragged element
Function DragDirective
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function DragDirective($parse, sfDragNDropService) {
return {
restrict: 'A',
link: function($scope, element, attrs) {
// Keep a ref to the dragged model value
Function link
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope, element, attrs) {
// Keep a ref to the dragged element
const item = $parse(attrs.sfDrop);
// Setting callbacks
const onDropCallback = $parse(attrs.sfOnDrop);
Function link
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope, element, attrs) {
// Keep a ref to the dragged model value
const item = $parse(attrs.sfDrag);
// Try to get dragged datas
Consider simplifying this complex logical expression. Open
Open
if(-1 !== itemIndex) {
sfDragNDropService.session.itemIndex = itemIndex;
sfDragNDropService.session.item = draggedItem;
sfDragNDropService.session.type = attrs.sfDragType || 'all';
sfDragNDropService.session.mime = attrs.sfDragMime || 'text/plain';