Skip to content

How to call shiftLayout on packery instance #42

@jrdn91

Description

@jrdn91

I'm a bit confused as to how to call shiftLayout on the packery instance. I have a listener on the dragStart and dragEnd events of Draggabilly to shrink the height of all elements to make them easier to drag and then once it's done bring the heights back to full. But when this happens I need to have packery shift the layout like their animation example so that everything shifts up to one another. How am I supposed to call this on the instance?

I have the packery data set to a scope property like so

$scope.packeryInstance = angular.element('.packery-wrapper').data('Packery');
$($scope.packeryInstance.element).on('dragStart',dragStartListener);
$($scope.packeryInstance.element).on('dragEnd',dragEndListener);

But in my listeners I can't figure out what the proper way to call the shiftLayout method is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions