gridstack-angular icon indicating copy to clipboard operation
gridstack-angular copied to clipboard

Enable/Disable grid in real time

Open codingfriend1 opened this issue 8 years ago • 6 comments

How can you enable and disable the grid in real time with angular. Perhaps a boolean that toggles whether dragging and resizing is enabled?

codingfriend1 avatar Aug 19 '16 18:08 codingfriend1

@codingfriend1 you have resolve? I need this option too

michalmw avatar Sep 13 '16 07:09 michalmw

I didn't.

codingfriend1 avatar Sep 13 '16 13:09 codingfriend1

+1

I need that feature

ancabi avatar Feb 06 '17 15:02 ancabi

I found a solution

function edit() {
    vm.state = !vm.state;

    angular.forEach($scope.gridstacker.grid.nodes,
        function(s) {

                $scope.gridstacker.resizable(s.el, !vm.state);
                $scope.gridstacker.movable(s.el, !vm.state);
            
        });

}

ancabi avatar Mar 02 '17 12:03 ancabi

@ancabi Where did you add this code?

dharmic avatar Mar 27 '18 14:03 dharmic

@dharmic sorry for taking a long time to answer, that function is called when I click a button

ancabi avatar Jul 13 '18 10:07 ancabi