Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(451)

Unified Diff: chrome/browser/resources/print_preview/margin_settings.js

Issue 8261005: More options for the types of margins to add. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview/margin_settings.js
diff --git a/chrome/browser/resources/print_preview/margin_settings.js b/chrome/browser/resources/print_preview/margin_settings.js
index 5f48ed79436849ad7b99a61aa0332341f76dacc6..1e30663ee6fd52153ad553c0097ab596822b20aa 100644
--- a/chrome/browser/resources/print_preview/margin_settings.js
+++ b/chrome/browser/resources/print_preview/margin_settings.js
@@ -172,24 +172,24 @@ cr.define('print_preview', function() {
/**
* @return {number} The value of the selected margin option.
- * @private
*/
- get selectedMarginsValue_() {
- return this.marginList_.options[this.marginList_.selectedIndex].value;
+ get selectedMarginsValue() {
+ var val = this.marginList_.options[this.marginList_.selectedIndex].value;
+ return parseInt(val, 10);
},
/**
* @return {boolean} True if default margins are selected.
*/
isDefaultMarginsSelected: function() {
- return this.selectedMarginsValue_ == MarginSettings.MARGINS_VALUE_DEFAULT;
+ return this.selectedMarginsValue == MarginSettings.MARGINS_VALUE_DEFAULT;
},
/**
* @return {boolean} True if no margins are selected.
*/
isNoMarginsSelected: function() {
- return this.selectedMarginsValue_ ==
+ return this.selectedMarginsValue ==
MarginSettings.MARGINS_VALUE_NO_MARGINS;
},
@@ -197,7 +197,7 @@ cr.define('print_preview', function() {
* @return {boolean} True if custom margins are selected.
*/
isCustomMarginsSelected: function() {
- return this.selectedMarginsValue_ == MarginSettings.MARGINS_VALUE_CUSTOM;
+ return this.selectedMarginsValue == MarginSettings.MARGINS_VALUE_CUSTOM;
},
/**
@@ -360,7 +360,7 @@ cr.define('print_preview', function() {
else if (this.isCustomMarginsSelected())
this.onCustomMarginsSelected_();
- this.lastSelectedOption_ = this.selectedMarginsValue_;
+ this.lastSelectedOption_ = this.selectedMarginsValue;
},
/**
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/print_preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698