blob: d581eeedb7290c738d4a2b9fa21786f757828ed9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Polymer({
is: 'print-preview-pages-per-sheet-settings',
behaviors: [SettingsBehavior, print_preview.SelectBehavior],
properties: {
disabled: Boolean,
},
observers: ['onPagesPerSheetSettingChange_(settings.pagesPerSheet.value)'],
/**
* @param {*} newValue The new value of the pages per sheet setting.
* @private
*/
onPagesPerSheetSettingChange_: function(newValue) {
this.selectedValue = /** @type {number} */ (newValue).toString();
this.setSetting(
'margins', print_preview.ticket_items.MarginsTypeValue.DEFAULT);
},
/** @param {string} value The new select value. */
onProcessSelectChange: function(value) {
this.setSetting('pagesPerSheet', parseInt(value, 10));
},
});
|