Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions src/packery.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
'containerStyle',
'columnWidth',
'gutter',
'isHorizontal',
'isInitLayout',
'isOriginLeft',
'isOriginTop',
'isResizeBound',
'isHorizontal', //v1
'horizontal',
'isInitLayout', //v1
'initLayout',
'isOriginLeft', //v1
'originLeft',
'isOriginTop', //v1
'originTop',
'isResizeBound', //v1
'resize',
'itemSelector',
'rowHeight',
'transitionDuration',
Expand Down Expand Up @@ -57,7 +62,7 @@
packery: packeryObj
});
el.data('Packery', packeryObj);
$rootScope.$emit('packeryInstantiated', packeryObj);
$rootScope.$broadcast('packeryInstantiated', packeryObj);
return packeryObj;
} else {
var interval = $interval(function(){
Expand Down Expand Up @@ -155,7 +160,7 @@
}

el.css('visibility','visible');
$rootScope.$emit('packeryObjectPacked', el[0]);
$rootScope.$broadcast('packeryObjectPacked', el[0]);
});
};

Expand All @@ -178,10 +183,15 @@
columnWidth: '@?', // Type: Number, Selector String
gutter: '@?', // Type: Number, Selector String
isHorizontal: '@?', // Type: Boolean
horizontal: '@?', // Type: Boolean
isInitLayout: '@?', // Type: Boolean
initLayout: '@?', // Type: Boolean
isOriginLeft: '@?', // Type: Boolean
originLeft: '@?', // Type: Boolean
isOriginTop: '@?', // Type: Boolean
originTop: '@?', // Type: Boolean
isResizeBound: '@?', // Type: Boolean
resize: '@?', // Type: Boolean
itemSelector: '@?', // Type: Selector String
rowHeight: '@?', // Type: Number, Selector String
transitionDuration: '@?', // Type: String
Expand All @@ -207,10 +217,15 @@
// @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.horizontal === 'false') { scope.horizontal = false; }
if (scope.isInitLayout === 'false') { scope.isInitLayout = false; }
if (scope.initLayout === 'false') { scope.initLayout = false; }
if (scope.isOriginLeft === 'false') { scope.isOriginLeft = false; }
if (scope.originLeft === 'false') { scope.originLeft = false; }
if (scope.isOriginTop === 'false') { scope.isOriginTop = false; }
if (scope.originTop === 'false') { scope.originTop = false; }
if (scope.isResizeBound === 'false') { scope.isResizeBound = false; }
if (scope.resizeBound === 'false') { scope.resizeBound = false; }
if (scope.isAppended === 'false') { scope.isAppended = false; }

// Creates JS Object for passing CSS styles into Packery
Expand Down