~didrocks/+junk/face-detection-15.04

« back to all changes in this revision

Viewing changes to facedetection/www/bower_components/iron-selector/iron-selector.html

  • Committer: Didier Roche
  • Date: 2016-05-10 23:09:11 UTC
  • Revision ID: didier.roche@canonical.com-20160510230911-c7xr490zrj3yrzxd
New version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--
 
2
@license
 
3
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
 
4
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
 
5
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
 
6
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
 
7
Code distributed by Google as part of the polymer project is also
 
8
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
 
9
-->
 
10
 
 
11
 
 
12
<link rel="import" href="../polymer/polymer.html">
 
13
<link rel="import" href="iron-multi-selectable.html">
 
14
 
 
15
<script>
 
16
  /**
 
17
  `iron-selector` is an element which can be used to manage a list of elements
 
18
  that can be selected.  Tapping on the item will make the item selected.  The `selected` indicates
 
19
  which item is being selected.  The default is to use the index of the item.
 
20
 
 
21
  Example:
 
22
 
 
23
      <iron-selector selected="0">
 
24
        <div>Item 1</div>
 
25
        <div>Item 2</div>
 
26
        <div>Item 3</div>
 
27
      </iron-selector>
 
28
 
 
29
  If you want to use the attribute value of an element for `selected` instead of the index,
 
30
  set `attrForSelected` to the name of the attribute.  For example, if you want to select item by
 
31
  `name`, set `attrForSelected` to `name`.
 
32
 
 
33
  Example:
 
34
 
 
35
      <iron-selector attr-for-selected="name" selected="foo">
 
36
        <div name="foo">Foo</div>
 
37
        <div name="bar">Bar</div>
 
38
        <div name="zot">Zot</div>
 
39
      </iron-selector>
 
40
 
 
41
  If no matching element is found using `attForSelected`, use `fallbackSelection` as fallback.
 
42
 
 
43
  Example:
 
44
 
 
45
        <iron-selector attr-for-selected="name" selected="non-existing"
 
46
                       fallback-selection="default">
 
47
          <div name="foo">Foo</div>
 
48
          <div name="bar">Bar</div>
 
49
          <div name="default">Default</div>
 
50
        </iron-selector>
 
51
 
 
52
  Note: When the selector is multi, the selection will set to `fallbackSelection` iff
 
53
  the number of matching elements is zero.
 
54
 
 
55
  `iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element.
 
56
 
 
57
  Example:
 
58
 
 
59
      <style>
 
60
        .iron-selected {
 
61
          background: #eee;
 
62
        }
 
63
      </style>
 
64
 
 
65
      ...
 
66
 
 
67
      <iron-selector selected="0">
 
68
        <div>Item 1</div>
 
69
        <div>Item 2</div>
 
70
        <div>Item 3</div>
 
71
      </iron-selector>
 
72
 
 
73
  @demo demo/index.html
 
74
  */
 
75
 
 
76
  Polymer({
 
77
 
 
78
    is: 'iron-selector',
 
79
 
 
80
    behaviors: [
 
81
      Polymer.IronMultiSelectableBehavior
 
82
    ]
 
83
 
 
84
  });
 
85
 
 
86
</script>