here is the angularJS directive using jquery UI. I want to set maximum width of the element that can be resize within the resize function. How does that possible?
app.directive('resizable', function () {
return {
restrict: 'A',
scope: {
callback: '&onResize'
},
link: function postLink(scope, elem, attrs) {
elem.resizable({ grid:200, handles: 'e,w'});
elem.on('resize', function (evt, ui) {
scope.$apply(function() {
if (scope.callback) {
scope.callback({$evt: evt, $ui: ui });
//here is where I want to set maximum width
}
})
});
}
};
});