Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3219 from woleicom/dev-1.5.0
Browse files Browse the repository at this point in the history
Create image.js
  • Loading branch information
Phinome authored Jun 13, 2017
2 parents fe3fc76 + 039c5cc commit d282854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dialogs/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d282854

Please sign in to comment.