| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 }, | 133 }, |
| 134 | 134 |
| 135 /** | 135 /** |
| 136 * @param {!Event} event | 136 * @param {!Event} event |
| 137 */ | 137 */ |
| 138 _onMouseMove: function(event) | 138 _onMouseMove: function(event) |
| 139 { | 139 { |
| 140 var node = this._treeOutline.treeElementFromEvent(event); | 140 var node = this._treeOutline.treeElementFromEvent(event); |
| 141 if (node === this._lastHoveredNode) | 141 if (node === this._lastHoveredNode) |
| 142 return; | 142 return; |
| 143 this.dispatchEventToListeners(WebInspector.LayerTreeOutline.Events.Layer
Hovered, node && node.representedObject ? {layer: node.representedObject} : null
); | 143 var selection = node && node.representedObject ? new WebInspector.Layers
3DView.LayerSelection(node.representedObject) : null; |
| 144 this.dispatchEventToListeners(WebInspector.LayerTreeOutline.Events.Layer
Hovered, selection); |
| 144 }, | 145 }, |
| 145 | 146 |
| 146 /** | 147 /** |
| 147 * @param {!WebInspector.LayerTreeElement} node | 148 * @param {!WebInspector.LayerTreeElement} node |
| 148 */ | 149 */ |
| 149 _selectedNodeChanged: function(node) | 150 _selectedNodeChanged: function(node) |
| 150 { | 151 { |
| 151 var layer = /** @type {!WebInspector.Layer} */ (node.representedObject); | 152 var layer = /** @type {!WebInspector.Layer} */ (node.representedObject); |
| 152 this.dispatchEventToListeners(WebInspector.LayerTreeOutline.Events.Layer
Selected, {layer: layer}); | 153 var selection = node.representedObject ? new WebInspector.Layers3DView.L
ayerSelection(node.representedObject) : null; |
| 154 this.dispatchEventToListeners(WebInspector.LayerTreeOutline.Events.Layer
Selected, selection); |
| 153 }, | 155 }, |
| 154 | 156 |
| 155 /** | 157 /** |
| 156 * @param {!Event} event | 158 * @param {!Event} event |
| 157 */ | 159 */ |
| 158 _onContextMenu: function(event) | 160 _onContextMenu: function(event) |
| 159 { | 161 { |
| 160 var node = this._treeOutline.treeElementFromEvent(event); | 162 var node = this._treeOutline.treeElementFromEvent(event); |
| 161 if (!node || !node.representedObject) | 163 if (!node || !node.representedObject) |
| 162 return; | 164 return; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 /** | 222 /** |
| 221 * @param {boolean} hovered | 223 * @param {boolean} hovered |
| 222 */ | 224 */ |
| 223 setHovered: function(hovered) | 225 setHovered: function(hovered) |
| 224 { | 226 { |
| 225 this.listItemElement.classList.toggle("hovered", hovered); | 227 this.listItemElement.classList.toggle("hovered", hovered); |
| 226 }, | 228 }, |
| 227 | 229 |
| 228 __proto__: TreeElement.prototype | 230 __proto__: TreeElement.prototype |
| 229 } | 231 } |
| OLD | NEW |