mode resize handles !

This commit is contained in:
jean-emmanuel 2016-02-17 13:03:15 +01:00
parent 19387cd930
commit 27e64a8d33
3 changed files with 36 additions and 12 deletions

View file

@ -60,14 +60,17 @@ enableEditor = function(){
}
var handleTarget
$('.widget.ui-resizable').resizable('destroy')
$(this).resizable({
handles:'se',
handles:'s, e, se',
helper: "ui-helper",
start: function(event, ui){
handleTarget = $(event.originalEvent.target);
},
stop: function( event, ui ) {
data.height = Math.max(ui.size.height,30)
data.width = Math.max(ui.size.width,30)
if (handleTarget.hasClass('ui-resizable-se') || handleTarget.hasClass('ui-resizable-s')) data.height = Math.max(ui.size.height,30)
if (handleTarget.hasClass('ui-resizable-se') || handleTarget.hasClass('ui-resizable-e')) data.width = Math.max(ui.size.width,30)
updateWidget()
},
snap:'.tab.on .widget, .tab.on',