JQueryUI에서 크기 조정을 동적으로 설정/해제하려고했지만 false로 설정 한 후에도 가로 세로 비율을 유지합니다. 아래는 내가 현재 작업하고있는 코드는 다음과 같습니다 초기화 후 JqueryUI Resizable AspectRatio를 적용 할 수 없습니까?
$('#aspect_check').click(function() {
var ischecked = $('#aspect_check').prop('checked');
if (ischecked) {
$("#resizable").resizable("option", "aspectRatio", .75);
} else {
$("#resizable").resizable("option", "aspectRatio", false);
}
});
는 나는 여전히 중요한 표시에도 불구하고 해결되지 않은 것 같습니다 전에 삼년에서 버그 리포트를 발견했다.
http://bugs.jqueryui.com/ticket/4186
해결 방법은 최신 버전에서 작동하지 않습니다. 어떤 아이디어?
편집 :
$(function() {
$.extend($.ui.resizable.prototype, (function (orig) {
return {
_mouseStart: function (event) {
this._aspectRatio = !!(this.options.aspectRatio);
return(orig.call(this, event));
}
};
})($.ui.resizable.prototype["_mouseStart"]));
});
이 자바 스크립트 스크립트 섹션에 붙여 넣 버그 리포트를 많이 겪고 후, 여기 주위의 작품이다. 희망 그것은 비슷한 문제를 가진 사람을 도와주세요!
대한 수정 작업을 온다! 감사합니다 – willDaBeast
해결 방법은 긍정적 인'originalPosition'에서만 작동합니다. 어떤 생각을 부정적인 가치로도 작동하게 만드는 방법은 무엇입니까? – Core972