This is the first time when I am working on a project which is based on angular.js framework and gridster-like widgets. The task is to get the live width and height of a certain div after it has been resized.
It is written in documentation that I need to pass desired options to the gridster directive and the new width and height can be found in the resize-stop event:
$scope.gridsterOpts = {
........
........
resizable: {
enabled: true,
handles: ['n', 'e', 's', 'w', 'ne', 'se', 'sw', 'nw'],
start: function(event, $element, widget) {}, // optional callback fired when resize is started,
resize: function(event, $element, widget) {}, // optional callback fired when item is resized,
stop: function(event, $element, widget) {} // optional callback fired when item is finished resizing
},
.....
};
I have done everything according to instructions but when I resize any div only "start" function is called, whereas other two functions of resizable object are not called. I would highly appreciate if you could give me any hint in this situation.
This was the link to docs: http://ift.tt/1vBGAk0
Aucun commentaire:
Enregistrer un commentaire