diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 15:35:31 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 15:35:31 +0000 |
commit | 8f323d604253480c1be59a74f05f7df528274c27 (patch) | |
tree | 4a3226d5e2a456c8e64429bc153f6acb13f26142 /chrome | |
parent | 71457bd8c084b8de3af988a4de35b9ae78d0de7b (diff) | |
download | chromium_src-8f323d604253480c1be59a74f05f7df528274c27.zip chromium_src-8f323d604253480c1be59a74f05f7df528274c27.tar.gz chromium_src-8f323d604253480c1be59a74f05f7df528274c27.tar.bz2 |
Print Preview: Fixing typo that causes margin lines to not snap correctly.
After renaming the enum constants |marginValidationStates| in margin_utils.js, some call sites where not updated.
BUG=Grab a margin line and drag outside the page very fast, the line should snap on the min/max allowed value. Instead it stops somewhere within the page.
TEST=Lines snap correctly.
Review URL: http://codereview.chromium.org/8349022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/resources/print_preview/margin_textbox.js | 2 | ||||
-rw-r--r-- | chrome/browser/resources/print_preview/margins_ui_pair.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/resources/print_preview/margin_textbox.js b/chrome/browser/resources/print_preview/margin_textbox.js index 8772ed4..733d46b 100644 --- a/chrome/browser/resources/print_preview/margin_textbox.js +++ b/chrome/browser/resources/print_preview/margin_textbox.js @@ -74,7 +74,7 @@ cr.define('print_preview', function() { this.lastValidValueInPoints + dragDeltaInPoints); } else if (validity == print_preview.marginValidationStates.TOO_SMALL) { this.value = print_preview.convertPointsToInchesText(0); - } else if (validity == print_preview.marginValidationStates.TOO_HIGH) { + } else if (validity == print_preview.marginValidationStates.TOO_BIG) { this.value = print_preview.convertPointsToInchesText(this.valueLimit); } diff --git a/chrome/browser/resources/print_preview/margins_ui_pair.js b/chrome/browser/resources/print_preview/margins_ui_pair.js index 3a5b494..7135145 100644 --- a/chrome/browser/resources/print_preview/margins_ui_pair.js +++ b/chrome/browser/resources/print_preview/margins_ui_pair.js @@ -233,9 +233,9 @@ cr.define('print_preview', function() { var validity = this.box_.validateDelta(dragDeltaInPoints); if (validity == print_preview.marginValidationStates.WITHIN_RANGE) this.moveTo(destinationPoint); - else if (validity == print_preview.marginValidationStates.TOO_LOW) + else if (validity == print_preview.marginValidationStates.TOO_SMALL) this.snapToMinValue_(); - else if (validity == print_preview.marginValidationStates.TOO_HIGH) + else if (validity == print_preview.marginValidationStates.TOO_BIG) this.snapToMaxValue_(); }, |