From 35b5c18ff8fcf9b7174089542f06e8afcede63f2 Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Mon, 3 Apr 2000 14:33:17 +0000 Subject: [PATCH] fix bug #9753 for constrain not working properly with pixels/percent --- editor/ui/dialogs/content/EdImageProps.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/editor/ui/dialogs/content/EdImageProps.js b/editor/ui/dialogs/content/EdImageProps.js index d852437ba985..9e5628319e73 100644 --- a/editor/ui/dialogs/content/EdImageProps.js +++ b/editor/ui/dialogs/content/EdImageProps.js @@ -318,9 +318,11 @@ function doDimensionEnabling( doEnable ) SetElementEnabledByID( "heightLabel", enable ); SetElementEnabledByID( "heightUnitsSelect", enable ); - - SetElementEnabledByID( "constrainCheckbox", enable ); - SetElementEnabledByID( "constrainLabel", enable ); + var constrainEnable = enable + && ( dialog.widthUnitsSelect.selectedIndex == 0 ) + && ( dialog.heightUnitsSelect.selectedIndex == 0 ); + SetElementEnabledByID( "constrainCheckbox", constrainEnable ); + SetElementEnabledByID( "constrainLabel", constrainEnable ); } function doOverallEnabling() @@ -380,6 +382,7 @@ function constrainProportions( srcID, destID ) // now find out if we should be constraining or not var constrainChecked = (dialog.constrainCheckbox.checked); + constrainChecked = constrainChecked && !dialog.constrainCheckbox.disabled; if ( !constrainChecked ) return;