| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** @polymerBehavior */ |
| 6 var ListItemBehavior = { |
| 7 ensureMaxZIndex: function() { |
| 8 // <iron-list> applies translate3d() transform on every element, which |
| 9 // means that in the natural order the (n-1)-th element is at a lower z |
| 10 // index than the n-th element. This prevents the popup menu from being |
| 11 // painted on top of other elements, and therefore a zIndex adjustment is |
| 12 // necessary. |
| 13 this.style.zIndex = ++ListItemBehavior.maxZIndex_; |
| 14 }, |
| 15 }; |
| 16 |
| 17 /** |
| 18 * The max z index assigned to an <iron-list> item so far. Used to |
| 19 * ensure that the per-item popup menu is displayed correctly. |
| 20 * @private {number} |
| 21 */ |
| 22 ListItemBehavior.maxZIndex_ = 0; |
| OLD | NEW |