Angular Gridster store position in DB
<p>I am building a customized Angular Gridster Dashboard. On loading the page, I call a function that loads the position, size and content of the Gridster Widgets from a database</p>

<pre><code>    function getDashboard() {
        $scope.dashboard.widgets = [];
        angular.forEach($scope.filtered_activities, function(object) {
            $scope.dashboard.widgets.push(
                {
                    pk: object.pk,
                    process: object.process,
                    row: object.row,
                    col: object.col,                    
                    sizeY: object.sizeY,
                    sizeX: object.sizeX,
                }
            )           
        });
    };
</code></pre>

<p>This works fine, and the widgets are just as I left them before I reloaded the page and the putActivies(widget) stores them in the DB.</p>

<p>However, when I want to drag them to a different position, I only get the position that I stored in the database and not the current position.</p>

<pre><code>    $scope.gridsterOptions = {
        margins: [20, 20],
        outerMargin: false,
        pushing: true,
        columns: 6,
        rowHeight: 100,
        draggable: {
            handle: 'h2',
            enabled: true,
            stop: function(event, $element, widget) {
                console.log(widget.col);
                putActivities(widget);
            }
        },
        resizable: {
        enabled: false,
    }
    };
</code></pre>

<p>So the console.log(widget.col) only gives me the database position, not the current one.
When I leave out the row and the col property from the getDashboard() it works, but then of course the don't have the right position.</p>

<p>Is there another way to access the widgets.col (and row) attribute) ?</p>

<p>My html looks like this:<br>
 li gridster-item="widget" ng-repeat="widget in dashboard.widgets"</p>