大家好我有一个网站,我在 div 中上传 Ajax 中的图像,该图像必须是可调整大小和可拖动的。问题是如果我调整它的大小,工作,如果我拖动它似乎有一个溢出:隐藏,因为我向左拖动图像在其限制后消失。我看过html代码并且有
ui-wrapper style="overflow:hidden..."
如果我放入我的样式表:
.ui-wrapper {
overflow:visible !important;
}
拖动有效,但现在无法调整大小!!!我该如何解决?
这是代码:
.ui-wrapper {
overflow:visible !important;
}
$(document).ready(function(){
var options = {
beforeSubmit: showRequest,
success: showResponse
};
$('#upload-form').ajaxForm(options);
});
function showResponse(responseText){
var id = 'image-resize_'+n_img_created;
n_img_created++;
$('<img class="draggable" id="'+id+'" '+responseText+'/>').appendTo("#space-drawable-div").resizable({
maxWidth: 212,
maxHeight: 220,
start: function( event, ui ) {
console.log('start resizable');
},
stop: function( event, ui ) {
console.log('stop resizable');
}
}).draggable({ containment: $('#space-drawable-div')});
}