From 2db6386e8814d6944b326fc47dac2835d92ab3e6 Mon Sep 17 00:00:00 2001 From: "Quintero, Edmund" Date: Thu, 12 Feb 2015 16:53:23 -0500 Subject: [PATCH 1/5] Added drag support for jQueryUI. --- dist/packery.js | 111 +++++++++++++++++++++++++++++++++----------- dist/packery.min.js | 2 +- src/packery.js | 111 +++++++++++++++++++++++++++++++++----------- 3 files changed, 167 insertions(+), 57 deletions(-) diff --git a/dist/packery.js b/dist/packery.js index 5b7930d..081a675 100644 --- a/dist/packery.js +++ b/dist/packery.js @@ -17,7 +17,7 @@ columnWidth: '.packery-sizer', itemSelector: '.packery-object', rowHeight: '.packery-sizer', - draggable: true, + draggable: undefined, handle: '*', timeout: 2000, acceptedAttributes: [ @@ -87,36 +87,94 @@ var self = this; self.packeryInstantiated = false; - self.packeryDraggable = false; + self.packeryDraggable = undefined; self.dragHandle = undefined; self.uniqueId = new Date().getTime(); self.packery = {}; this.bindDragEvents = function(el) { - var handleSelector, handle, draggabilly; + var handleSelector, handle, draggableItem; handleSelector = self.dragHandle; - if (handleSelector === '*') { - draggabilly = new Draggabilly(el[0]); - handle = el; - } else { - draggabilly = new Draggabilly(el[0], { - handle: handleSelector - }); - handle = el.querySelectorAll(handleSelector); + try { + + if ( self.packeryDraggable === 'draggabilly' ) { + bindDraggabilly(); + } else if ( self.packeryDraggable === 'jqueryui' ) { + bindjQueryUI(); + } else if ( self.packeryDraggable !== 'unsupported' ){ + if( !bindDraggabilly(true) ){ + if( !bindjQueryUI(true) ) { + return; + } + } + } + animateEvents(); + + } catch(e) { + if (window.console) { + window.console.warn(e.name +' '+ e.message); + } } - // Init Draggabilly events - self.packery.bindDraggabillyEvents(draggabilly); + function bindDraggabilly (next) { + next = ( typeof next === 'boolean' ) ? next : false; + if (typeof window.Draggabilly !== 'undefined') { + + if (handleSelector === '*') { + draggableItem = new window.Draggabilly(el[0]); + handle = el; + } else { + draggableItem = new window.Draggabilly(el[0], { + handle: handleSelector + }); + handle = el[0].querySelectorAll(handleSelector); + } + + // Init Draggabilly events + self.packery.bindDraggabillyEvents(draggableItem); + return true; - // Bind animate events for touch - handle.on('mouseenter', function(){ - el.addClass('hovered'); - }). - on('mouseleave', function(){ - el.removeClass('hovered'); - }); + } else if ( !next ) { + throw { name: 'Warning: ', message: 'Draggabilly is undefined.' }; + } else { + return false; + } + } + + function bindjQueryUI (next) { + next = ( typeof next === 'boolean' ) ? next : false; + if (typeof window.jQuery !== 'undefined' && typeof window.jQuery.ui !== 'undefined') { + + if (handleSelector === '*') { + draggableItem = angular.element(el[0]).draggable(); + handle = el; + } else { + draggableItem = angular.element(el[0]).draggable({ + handle: handleSelector + }); + handle = el[0].querySelectorAll(handleSelector); + } + + self.packery.bindUIDraggableEvents(draggableItem); + return true; + } else if ( !next ) { + throw { name: 'Warning: ', message: 'jQuery.ui is undefined.' }; + } else { + return false; + } + } + + function animateEvents () { + // Bind animate events for touch + angular.element(handle).on('mouseenter', function(){ + el.addClass('hovered'); + }). + on('mouseleave', function(){ + el.removeClass('hovered'); + }); + } }; this.createAttrObj = function (scope) { @@ -150,17 +208,14 @@ self.packery.appended(el[0]); } - if (self.packeryDraggable === true) { - self.bindDragEvents(el); - } - + self.bindDragEvents(el); el.css('visibility','visible'); $rootScope.$emit('packeryObjectPacked', el[0]); }); }; - this.setDraggable = function (handle) { - self.packeryDraggable = true; + this.setDraggable = function (dragLib, handle) { + self.packeryDraggable = dragLib; self.dragHandle = handle; }; }; @@ -185,7 +240,7 @@ rowHeight: '@?', // Type: Number, Selector String transitionDuration: '@?', // Type: String - draggable: '@?', // Type: Boolean + draggable: '@?', // Type: String handle: '@?' // Type: Boolean // Let's come back to this one... @@ -203,7 +258,7 @@ scope.handle = scope.handle || config.handle; // Set global draggability - scope.draggable ? controller.setDraggable(scope.handle) : angular.noop(); + scope.draggable ? controller.setDraggable(scope.draggable, scope.handle) : angular.noop(); // Create object for Packery instantiation packeryObj = controller.createAttrObj(scope); diff --git a/dist/packery.min.js b/dist/packery.min.js index 06abfd8..5c90717 100644 --- a/dist/packery.min.js +++ b/dist/packery.min.js @@ -5,4 +5,4 @@ * License: MIT */ -"use strict";!function(){var a=["packeryTemplates"],b={columnWidth:".packery-sizer",itemSelector:".packery-object",rowHeight:".packery-sizer",draggable:!0,handle:"*",timeout:2e3,acceptedAttributes:["containerStyle","columnWidth","gutter","isHorizontal","isInitLayout","isOriginLeft","isOriginTop","isResizeBound","itemSelector","rowHeight","transitionDuration"]},c=function(a,b,c,d,e){var f,g=[],h=function(a,b){for(var c=0;c",'
','
',""].join("")),a.put("template/packery/packery-object.html",'
')};angular.module("angular-packery",a).constant("packeryConfig",b).service("packeryService",["$rootScope","$q","$interval","$timeout","packeryConfig",c]).controller("PackeryController",["$rootScope","packeryConfig","packeryService",d]).directive("packery",["packeryConfig","packeryService",e]).directive("packeryObject",[f]).directive("packeryObject",[g]),angular.module("packeryTemplates",[]).run(["$templateCache",h])}(); \ No newline at end of file +"use strict";!function(){var a=["packeryTemplates"],b={columnWidth:".packery-sizer",itemSelector:".packery-object",rowHeight:".packery-sizer",draggable:void 0,handle:"*",timeout:2e3,acceptedAttributes:["containerStyle","columnWidth","gutter","isHorizontal","isInitLayout","isOriginLeft","isOriginTop","isResizeBound","itemSelector","rowHeight","transitionDuration"]},c=function(a,b,c,d,e){var f,g=[],h=function(a,b){for(var c=0;c",'
','
',""].join("")),a.put("template/packery/packery-object.html",'
')};angular.module("angular-packery",a).constant("packeryConfig",b).service("packeryService",["$rootScope","$q","$interval","$timeout","packeryConfig",c]).controller("PackeryController",["$rootScope","packeryConfig","packeryService",d]).directive("packery",["packeryConfig","packeryService",e]).directive("packeryObject",[f]).directive("packeryObject",[g]),angular.module("packeryTemplates",[]).run(["$templateCache",h])}(); \ No newline at end of file diff --git a/src/packery.js b/src/packery.js index 5871c47..c46c12e 100644 --- a/src/packery.js +++ b/src/packery.js @@ -10,7 +10,7 @@ columnWidth: '.packery-sizer', itemSelector: '.packery-object', rowHeight: '.packery-sizer', - draggable: true, + draggable: undefined, handle: '*', timeout: 2000, acceptedAttributes: [ @@ -80,36 +80,94 @@ var self = this; self.packeryInstantiated = false; - self.packeryDraggable = false; + self.packeryDraggable = undefined; self.dragHandle = undefined; self.uniqueId = new Date().getTime(); self.packery = {}; this.bindDragEvents = function(el) { - var handleSelector, handle, draggabilly; + var handleSelector, handle, draggableItem; handleSelector = self.dragHandle; - if (handleSelector === '*') { - draggabilly = new Draggabilly(el[0]); - handle = el; - } else { - draggabilly = new Draggabilly(el[0], { - handle: handleSelector - }); - handle = el.querySelectorAll(handleSelector); + try { + + if ( self.packeryDraggable === 'draggabilly' ) { + bindDraggabilly(); + } else if ( self.packeryDraggable === 'jqueryui' ) { + bindjQueryUI(); + } else if ( self.packeryDraggable !== 'unsupported' ){ + if( !bindDraggabilly(true) ){ + if( !bindjQueryUI(true) ) { + return; + } + } + } + animateEvents(); + + } catch(e) { + if (window.console) { + window.console.warn(e.name +' '+ e.message); + } } - // Init Draggabilly events - self.packery.bindDraggabillyEvents(draggabilly); + function bindDraggabilly (next) { + next = ( typeof next === 'boolean' ) ? next : false; + if (typeof window.Draggabilly !== 'undefined') { + + if (handleSelector === '*') { + draggableItem = new window.Draggabilly(el[0]); + handle = el; + } else { + draggableItem = new window.Draggabilly(el[0], { + handle: handleSelector + }); + handle = el[0].querySelectorAll(handleSelector); + } + + // Init Draggabilly events + self.packery.bindDraggabillyEvents(draggableItem); + return true; - // Bind animate events for touch - handle.on('mouseenter', function(){ - el.addClass('hovered'); - }). - on('mouseleave', function(){ - el.removeClass('hovered'); - }); + } else if ( !next ) { + throw { name: 'Warning: ', message: 'Draggabilly is undefined.' }; + } else { + return false; + } + } + + function bindjQueryUI (next) { + next = ( typeof next === 'boolean' ) ? next : false; + if (typeof window.jQuery !== 'undefined' && typeof window.jQuery.ui !== 'undefined') { + + if (handleSelector === '*') { + draggableItem = angular.element(el[0]).draggable(); + handle = el; + } else { + draggableItem = angular.element(el[0]).draggable({ + handle: handleSelector + }); + handle = el[0].querySelectorAll(handleSelector); + } + + self.packery.bindUIDraggableEvents(draggableItem); + return true; + } else if ( !next ) { + throw { name: 'Warning: ', message: 'jQuery.ui is undefined.' }; + } else { + return false; + } + } + + function animateEvents () { + // Bind animate events for touch + angular.element(handle).on('mouseenter', function(){ + el.addClass('hovered'); + }). + on('mouseleave', function(){ + el.removeClass('hovered'); + }); + } }; this.createAttrObj = function (scope) { @@ -143,17 +201,14 @@ self.packery.appended(el[0]); } - if (self.packeryDraggable === true) { - self.bindDragEvents(el); - } - + self.bindDragEvents(el); el.css('visibility','visible'); $rootScope.$emit('packeryObjectPacked', el[0]); }); }; - this.setDraggable = function (handle) { - self.packeryDraggable = true; + this.setDraggable = function (dragLib, handle) { + self.packeryDraggable = dragLib; self.dragHandle = handle; }; }; @@ -178,7 +233,7 @@ rowHeight: '@?', // Type: Number, Selector String transitionDuration: '@?', // Type: String - draggable: '@?', // Type: Boolean + draggable: '@?', // Type: String handle: '@?' // Type: Boolean // Let's come back to this one... @@ -196,7 +251,7 @@ scope.handle = scope.handle || config.handle; // Set global draggability - scope.draggable ? controller.setDraggable(scope.handle) : angular.noop(); + scope.draggable ? controller.setDraggable(scope.draggable, scope.handle) : angular.noop(); // Create object for Packery instantiation packeryObj = controller.createAttrObj(scope); From a6e69170315d7f78f755aa522c16975e100cf0ef Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Feb 2015 11:22:07 -0500 Subject: [PATCH 2/5] Defaulted draggable and drag handle to undefined. Added check for draggable as attribute on packery element --- src/packery.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/packery.js b/src/packery.js index 05a96aa..f6eccbd 100644 --- a/src/packery.js +++ b/src/packery.js @@ -11,7 +11,7 @@ itemSelector: '.packery-object', rowHeight: '.packery-sizer', draggable: undefined, - handle: '*', + handle: undefined, timeout: 2000, acceptedAttributes: [ 'containerStyle', @@ -81,7 +81,7 @@ self.packeryInstantiated = false; self.packeryDraggable = undefined; - self.dragHandle = '*'; + self.dragHandle = undefined; self.uniqueId = new Date().getTime(); self.packery = {}; @@ -92,6 +92,7 @@ try { + if( self.packeryDraggable ) { console.log('its defined'); } if ( self.packeryDraggable === 'draggabilly' ) { bindDraggabilly(); } else if ( self.packeryDraggable === 'jqueryui' ) { @@ -112,7 +113,7 @@ next = ( typeof next === 'boolean' ) ? next : false; if (typeof window.Draggabilly !== 'undefined') { - if (handleSelector === '*') { + if (!handleSelector) { draggableItem = new window.Draggabilly(el[0]); handle = el; } else { @@ -137,7 +138,7 @@ next = ( typeof next === 'boolean' ) ? next : false; if (typeof window.jQuery !== 'undefined' && typeof window.jQuery.ui !== 'undefined') { - if (handleSelector === '*') { + if (!handleSelector) { draggableItem = angular.element(el[0]).draggable(); handle = el; } else { @@ -250,7 +251,7 @@ // Quick fix so 'false' strings don't evaluate to true // @TODO: Check for attribute itself, not value of attribute - if (scope.draggable === 'false') { scope.draggable = false; } + // if (scope.draggable === 'false') { scope.draggable = false; } if (scope.isHorizontal === 'false') { scope.isHorizontal = false; } if (scope.isInitLayout === 'false') { scope.isInitLayout = false; } if (scope.isOriginLeft === 'false') { scope.isOriginLeft = false; } @@ -258,7 +259,11 @@ if (scope.isResizeBound === 'false') { scope.isResizeBound = false; } // Set global draggability - scope.draggable = (scope.draggable) ? controller.setDraggable(scope.draggable, scope.handle) : angular.noop(); + if (element[0].hasAttribute('draggable')) { + console.log(scope.draggable); + controller.setDraggable(scope.draggable, scope.handle); + } + // scope.draggable = (scope.draggable) ? controller.setDraggable(scope.draggable, scope.handle) : angular.noop(); // Create object for Packery instantiation packeryObj = controller.createAttrObj(scope); From a33a5456d679dcc6906b4659e82087f2d2eb4679 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Feb 2015 12:20:14 -0500 Subject: [PATCH 3/5] removed 'unsupported' check and changed logic to drag off by default. --- src/packery.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/packery.js b/src/packery.js index f6eccbd..43a99c8 100644 --- a/src/packery.js +++ b/src/packery.js @@ -92,15 +92,16 @@ try { - if( self.packeryDraggable ) { console.log('its defined'); } - if ( self.packeryDraggable === 'draggabilly' ) { - bindDraggabilly(); - } else if ( self.packeryDraggable === 'jqueryui' ) { - bindjQueryUI(); - } else if ( self.packeryDraggable !== 'unsupported' ){ + if( !self.packeryDraggable ) { if( !bindDraggabilly(true) ){ bindjQueryUI(true); } + } else if ( self.packeryDraggable === 'draggabilly' ) { + bindDraggabilly(); + } else if ( self.packeryDraggable === 'jqueryui' ) { + bindjQueryUI(); + } else { + window.console.error('ERROR: draggable=\''+ self.packeryDraggable +'\' is not a valid attribute.'); } } catch(e) { @@ -128,7 +129,7 @@ animateEvents(); return true; } else if ( !next ) { - throw { name: 'Warning: ', message: 'Draggabilly is undefined.' }; + throw { name: 'WARNING: ', message: 'Draggabilly is undefined.' }; } else { return false; } @@ -152,7 +153,7 @@ animateEvents(); return true; } else if ( !next ) { - throw { name: 'Warning: ', message: 'jQuery.ui is undefined.' }; + throw { name: 'WARNING: ', message: 'jQuery.ui is undefined.' }; } else { return false; } @@ -260,10 +261,8 @@ // Set global draggability if (element[0].hasAttribute('draggable')) { - console.log(scope.draggable); controller.setDraggable(scope.draggable, scope.handle); } - // scope.draggable = (scope.draggable) ? controller.setDraggable(scope.draggable, scope.handle) : angular.noop(); // Create object for Packery instantiation packeryObj = controller.createAttrObj(scope); From a10413a77410a8c4185fde772274aeeabb191c7a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Feb 2015 12:24:11 -0500 Subject: [PATCH 4/5] Added build code. --- dist/packery.js | 30 ++++++++++++++++-------------- dist/packery.min.js | 2 +- src/packery.js | 1 - 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/dist/packery.js b/dist/packery.js index 726edd1..c3194cc 100644 --- a/dist/packery.js +++ b/dist/packery.js @@ -18,7 +18,7 @@ itemSelector: '.packery-object', rowHeight: '.packery-sizer', draggable: undefined, - handle: '*', + handle: undefined, timeout: 2000, acceptedAttributes: [ 'containerStyle', @@ -88,7 +88,7 @@ self.packeryInstantiated = false; self.packeryDraggable = undefined; - self.dragHandle = '*'; + self.dragHandle = undefined; self.uniqueId = new Date().getTime(); self.packery = {}; @@ -99,14 +99,16 @@ try { - if ( self.packeryDraggable === 'draggabilly' ) { - bindDraggabilly(); - } else if ( self.packeryDraggable === 'jqueryui' ) { - bindjQueryUI(); - } else if ( self.packeryDraggable !== 'unsupported' ){ + if( !self.packeryDraggable ) { if( !bindDraggabilly(true) ){ bindjQueryUI(true); } + } else if ( self.packeryDraggable === 'draggabilly' ) { + bindDraggabilly(); + } else if ( self.packeryDraggable === 'jqueryui' ) { + bindjQueryUI(); + } else { + window.console.error('ERROR: draggable=\''+ self.packeryDraggable +'\' is not a valid attribute.'); } } catch(e) { @@ -119,7 +121,7 @@ next = ( typeof next === 'boolean' ) ? next : false; if (typeof window.Draggabilly !== 'undefined') { - if (handleSelector === '*') { + if (!handleSelector) { draggableItem = new window.Draggabilly(el[0]); handle = el; } else { @@ -134,7 +136,7 @@ animateEvents(); return true; } else if ( !next ) { - throw { name: 'Warning: ', message: 'Draggabilly is undefined.' }; + throw { name: 'WARNING: ', message: 'Draggabilly is undefined.' }; } else { return false; } @@ -144,9 +146,8 @@ next = ( typeof next === 'boolean' ) ? next : false; if (typeof window.jQuery !== 'undefined' && typeof window.jQuery.ui !== 'undefined') { - if (handleSelector === '*') { + if (!handleSelector) { draggableItem = angular.element(el[0]).draggable(); - handle = el; } else { draggableItem = angular.element(el[0]).draggable({ @@ -159,7 +160,7 @@ animateEvents(); return true; } else if ( !next ) { - throw { name: 'Warning: ', message: 'jQuery.ui is undefined.' }; + throw { name: 'WARNING: ', message: 'jQuery.ui is undefined.' }; } else { return false; } @@ -258,7 +259,6 @@ // Quick fix so 'false' strings don't evaluate to true // @TODO: Check for attribute itself, not value of attribute - if (scope.draggable === 'false') { scope.draggable = false; } if (scope.isHorizontal === 'false') { scope.isHorizontal = false; } if (scope.isInitLayout === 'false') { scope.isInitLayout = false; } if (scope.isOriginLeft === 'false') { scope.isOriginLeft = false; } @@ -266,7 +266,9 @@ if (scope.isResizeBound === 'false') { scope.isResizeBound = false; } // Set global draggability - scope.draggable = (scope.draggable) ? controller.setDraggable(scope.draggable, scope.handle) : angular.noop(); + if (element[0].hasAttribute('draggable')) { + controller.setDraggable(scope.draggable, scope.handle); + } // Create object for Packery instantiation packeryObj = controller.createAttrObj(scope); diff --git a/dist/packery.min.js b/dist/packery.min.js index 947fe35..07cbc2d 100644 --- a/dist/packery.min.js +++ b/dist/packery.min.js @@ -5,4 +5,4 @@ * License: MIT */ -"use strict";!function(){var a=["packeryTemplates"],b={columnWidth:".packery-sizer",itemSelector:".packery-object",rowHeight:".packery-sizer",draggable:void 0,handle:"*",timeout:2e3,acceptedAttributes:["containerStyle","columnWidth","gutter","isHorizontal","isInitLayout","isOriginLeft","isOriginTop","isResizeBound","itemSelector","rowHeight","transitionDuration"]},c=function(a,b,c,d,e){var f,g=[],h=function(a,b){for(var c=0;c",'
','
',""].join("")),a.put("template/packery/packery-object.html",'
')};angular.module("angular-packery",a).constant("packeryConfig",b).service("packeryService",["$rootScope","$q","$interval","$timeout","packeryConfig",c]).controller("PackeryController",["$rootScope","packeryConfig","packeryService",d]).directive("packery",["packeryConfig","packeryService",e]).directive("packeryObject",[f]).directive("packeryObject",[g]),angular.module("packeryTemplates",[]).run(["$templateCache",h])}(); \ No newline at end of file +"use strict";!function(){var a=["packeryTemplates"],b={columnWidth:".packery-sizer",itemSelector:".packery-object",rowHeight:".packery-sizer",draggable:void 0,handle:void 0,timeout:2e3,acceptedAttributes:["containerStyle","columnWidth","gutter","isHorizontal","isInitLayout","isOriginLeft","isOriginTop","isResizeBound","itemSelector","rowHeight","transitionDuration"]},c=function(a,b,c,d,e){var f,g=[],h=function(a,b){for(var c=0;c",'
','
',""].join("")),a.put("template/packery/packery-object.html",'
')};angular.module("angular-packery",a).constant("packeryConfig",b).service("packeryService",["$rootScope","$q","$interval","$timeout","packeryConfig",c]).controller("PackeryController",["$rootScope","packeryConfig","packeryService",d]).directive("packery",["packeryConfig","packeryService",e]).directive("packeryObject",[f]).directive("packeryObject",[g]),angular.module("packeryTemplates",[]).run(["$templateCache",h])}(); \ No newline at end of file diff --git a/src/packery.js b/src/packery.js index 43a99c8..ed1134f 100644 --- a/src/packery.js +++ b/src/packery.js @@ -252,7 +252,6 @@ // Quick fix so 'false' strings don't evaluate to true // @TODO: Check for attribute itself, not value of attribute - // if (scope.draggable === 'false') { scope.draggable = false; } if (scope.isHorizontal === 'false') { scope.isHorizontal = false; } if (scope.isInitLayout === 'false') { scope.isInitLayout = false; } if (scope.isOriginLeft === 'false') { scope.isOriginLeft = false; } From 89397b79aa2c927fc8e47327d2aa744b39fb483b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Feb 2015 12:54:24 -0500 Subject: [PATCH 5/5] Updated console error for unsuported libraries. --- dist/packery.js | 2 +- dist/packery.min.js | 2 +- src/packery.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/packery.js b/dist/packery.js index c3194cc..1fab723 100644 --- a/dist/packery.js +++ b/dist/packery.js @@ -108,7 +108,7 @@ } else if ( self.packeryDraggable === 'jqueryui' ) { bindjQueryUI(); } else { - window.console.error('ERROR: draggable=\''+ self.packeryDraggable +'\' is not a valid attribute.'); + window.console.error('ERROR: draggable=\''+ self.packeryDraggable +'\' is not a supported library.'); } } catch(e) { diff --git a/dist/packery.min.js b/dist/packery.min.js index 07cbc2d..5b6508e 100644 --- a/dist/packery.min.js +++ b/dist/packery.min.js @@ -5,4 +5,4 @@ * License: MIT */ -"use strict";!function(){var a=["packeryTemplates"],b={columnWidth:".packery-sizer",itemSelector:".packery-object",rowHeight:".packery-sizer",draggable:void 0,handle:void 0,timeout:2e3,acceptedAttributes:["containerStyle","columnWidth","gutter","isHorizontal","isInitLayout","isOriginLeft","isOriginTop","isResizeBound","itemSelector","rowHeight","transitionDuration"]},c=function(a,b,c,d,e){var f,g=[],h=function(a,b){for(var c=0;c",'
','
',""].join("")),a.put("template/packery/packery-object.html",'
')};angular.module("angular-packery",a).constant("packeryConfig",b).service("packeryService",["$rootScope","$q","$interval","$timeout","packeryConfig",c]).controller("PackeryController",["$rootScope","packeryConfig","packeryService",d]).directive("packery",["packeryConfig","packeryService",e]).directive("packeryObject",[f]).directive("packeryObject",[g]),angular.module("packeryTemplates",[]).run(["$templateCache",h])}(); \ No newline at end of file +"use strict";!function(){var a=["packeryTemplates"],b={columnWidth:".packery-sizer",itemSelector:".packery-object",rowHeight:".packery-sizer",draggable:void 0,handle:void 0,timeout:2e3,acceptedAttributes:["containerStyle","columnWidth","gutter","isHorizontal","isInitLayout","isOriginLeft","isOriginTop","isResizeBound","itemSelector","rowHeight","transitionDuration"]},c=function(a,b,c,d,e){var f,g=[],h=function(a,b){for(var c=0;c",'
','
',""].join("")),a.put("template/packery/packery-object.html",'
')};angular.module("angular-packery",a).constant("packeryConfig",b).service("packeryService",["$rootScope","$q","$interval","$timeout","packeryConfig",c]).controller("PackeryController",["$rootScope","packeryConfig","packeryService",d]).directive("packery",["packeryConfig","packeryService",e]).directive("packeryObject",[f]).directive("packeryObject",[g]),angular.module("packeryTemplates",[]).run(["$templateCache",h])}(); \ No newline at end of file diff --git a/src/packery.js b/src/packery.js index ed1134f..ea23311 100644 --- a/src/packery.js +++ b/src/packery.js @@ -101,7 +101,7 @@ } else if ( self.packeryDraggable === 'jqueryui' ) { bindjQueryUI(); } else { - window.console.error('ERROR: draggable=\''+ self.packeryDraggable +'\' is not a valid attribute.'); + window.console.error('ERROR: draggable=\''+ self.packeryDraggable +'\' is not a supported library.'); } } catch(e) {