0
사람들이지도에 그림을 그릴 수있는 jquery 프로젝트를 작성하면지도에서 div를 배치 한 다음 이동하고 크기를 조정할 수 있습니다. 사이드의 크기를 변경하는 동안 div의 현재 너비/높이를 업데이트하는 상자가 필요합니다. 현재는 작동하지만 크기가 조정 된 후에 만 업데이트됩니다.하지만 크기를 조정하는 동안 실시간으로 업데이트하고 싶습니다. 크기 조정 만 업데이트 할크기를 재조정 할 때 크기를 재조정 할 수있는 Jquery 크기 표시
내 현재 코드 :
는$(item).resizable({
grid: Math.round(gridStand),
stop : function(event,ui) {
endW = Math.round($(this).outerWidth()/gridStand);
endH = Math.round($(this).outerHeight()/gridStand);
$(this).attr('w', endW).attr('h', endH)
$('.standW').html('<h5>Breedte</h5><h4>'+($(item).attr('w')/2)+'</h4><span>meter</span>');
$('.standH').html('<h5>Diepte</h5><h4>'+($(item).attr('h')/2)+'</h4><span>meter</span>')
}
})
.draggable({
grid: [ Math.round(gridStand), Math.round(gridStand) ],
containment: "#map",
scroll: false,
stop : function(event,ui) {
endX = Math.round($(this).position().left/gridStand);
endY = Math.round($(this).position().top/gridStand);
$(this).attr('x', endX).attr('y', endY)
}
})
사람의 크기를 변경할 방법이 그래서 업데이트 변경을 알고 있나요하지 만 크기 조정이 완료되면?
감사합니다. 작동합니다! 좀 나쁜 cos cosy 내가 실제로 크기를 조정하기 전에 시도했지만 그것을 계산하는 부분을 추가하는 것을 잊어 버렸습니다. – Holapress