From 039c5ccebfaad6cdaaa1e22c212d45fe96780826 Mon Sep 17 00:00:00 2001 From: woleicom <572962673@qq.com> Date: Tue, 13 Jun 2017 15:02:00 +0800 Subject: [PATCH] Create image.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更改图片尺寸大小bug --- dialogs/image/image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dialogs/image/image.js b/dialogs/image/image.js index c79062623..a7e822ea5 100644 --- a/dialogs/image/image.js +++ b/dialogs/image/image.js @@ -177,22 +177,22 @@ domUtils.on($G("title"), 'keyup', updatePreview); domUtils.on($G("width"), 'keyup', function(){ - updatePreview(); if(locker.checked) { var proportion =locker.getAttribute('data-proportion'); $G('height').value = Math.round(this.value / proportion); } else { _this.updateLocker(); } + updatePreview(); }); domUtils.on($G("height"), 'keyup', function(){ - updatePreview(); if(locker.checked) { var proportion =locker.getAttribute('data-proportion'); $G('width').value = Math.round(this.value * proportion); } else { _this.updateLocker(); } + updatePreview(); }); domUtils.on($G("lock"), 'change', function(){ var proportion = parseInt($G("width").value) /parseInt($G("height").value);