Chromium Code Reviews| 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 /** | |
| 6 * The max z index assigned to an <iron-list> item so far. Used to | |
| 7 * ensure that the per-item popup menu is displayed correctly. | |
| 8 * @private {number} | |
| 9 */ | |
| 10 var maxZIndex_ = 0; | |
| 11 | |
| 12 /** @polymerBehavior */ | |
| 13 var ListItemBehavior = { | |
| 14 showActionMenu: function() { | |
|
Dan Beam
2016/09/27 23:02:04
this really doesn't show any action menu. it real
dpapad
2016/09/28 00:13:35
Renamed.
| |
| 15 // <iron-list> applies translate3d() transform on every element, which | |
| 16 // means that in the natural order the (n-1)-th element is at a lower z | |
| 17 // index than the n-th element. This prevents the popup menu from being | |
| 18 // painted on top of other elements, and therefore a zIndex adjustment is | |
| 19 // necessary. | |
| 20 this.style.zIndex = ++maxZIndex_; | |
| 21 }, | |
| 22 }; | |
|
Dan Beam
2016/09/27 23:02:04
can we make this static and private?
ListItemBeha
dpapad
2016/09/28 00:13:35
Already responded to Steven's similar question. Tr
Dan Beam
2016/09/28 01:32:07
I can see how this would look a little confusing.
dpapad
2016/09/28 01:50:32
Done. Thanks for the clarification. I misunderstoo
| |
| OLD | NEW |