mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 11:52:14 +09:00
#301 본문의 -20px만큼 가로를 줄이던 resize를 -2px로 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3195 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
02dc20ca51
commit
b74ffba62f
1 changed files with 4 additions and 4 deletions
|
|
@ -239,10 +239,10 @@ function resizeImageContents() {
|
|||
var obj_width = xWidth(obj);
|
||||
var obj_height = xHeight(obj);
|
||||
|
||||
// 만약 선택된 이미지의 가로 크기가 부모의 가로크기보다 크면 리사이즈 (이때 부모의 가로크기 - 20 정도로 지정해줌)
|
||||
if(obj_width > parent_width - 20) {
|
||||
// 만약 선택된 이미지의 가로 크기가 부모의 가로크기보다 크면 리사이즈 (이때 부모의 가로크기 - 2 정도로 지정해줌)
|
||||
if(obj_width > parent_width - 2) {
|
||||
obj.style.cursor = "pointer";
|
||||
var new_w = parent_width - 20;
|
||||
var new_w = parent_width - 2;
|
||||
var new_h = Math.round(obj_height * new_w/obj_width);
|
||||
xWidth(obj, new_w);
|
||||
xHeight(obj, new_h);
|
||||
|
|
@ -251,7 +251,7 @@ function resizeImageContents() {
|
|||
} else {
|
||||
var orig_img = new Image();
|
||||
orig_img.src = obj.src;
|
||||
if(orig_img.width > parent_width - 20 || orig_img.width != obj_width) {
|
||||
if(orig_img.width > parent_width - 2 || orig_img.width != obj_width) {
|
||||
obj.style.cursor = "pointer";
|
||||
xAddEventListener(obj,"click", showOriginalImage);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue