blob: b84fbe2bd00b9714b47b1c5fa178b317b2274184 (
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
|
// Copyright 2017 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-layout-settings',
behaviors: [SettingsBehavior],
properties: {
disabled: Boolean,
},
observers: ['onLayoutSettingChange_(settings.layout.value)'],
/**
* @param {*} value The new value of the layout setting.
* @private
*/
onLayoutSettingChange_: function(value) {
this.$$('select').value =
/** @type {boolean} */ (value) ? 'landscape' : 'portrait';
},
/** @private */
onChange_: function() {
this.setSetting('layout', this.$$('select').value == 'landscape');
},
});
|