| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 this._leftResizeElement = parentElement.createChild("div", "overview-grid-wi
ndow-resizer"); | 172 this._leftResizeElement = parentElement.createChild("div", "overview-grid-wi
ndow-resizer"); |
| 173 this._leftResizeElement.style.left = "0"; | 173 this._leftResizeElement.style.left = "0"; |
| 174 WebInspector.installDragHandle(this._leftResizeElement, this._resizerElement
StartDragging.bind(this), this._leftResizeElementDragging.bind(this), null, "ew-
resize"); | 174 WebInspector.installDragHandle(this._leftResizeElement, this._resizerElement
StartDragging.bind(this), this._leftResizeElementDragging.bind(this), null, "ew-
resize"); |
| 175 | 175 |
| 176 this._rightResizeElement = parentElement.createChild("div", "overview-grid-w
indow-resizer"); | 176 this._rightResizeElement = parentElement.createChild("div", "overview-grid-w
indow-resizer"); |
| 177 this._rightResizeElement.style.right = "0"; | 177 this._rightResizeElement.style.right = "0"; |
| 178 WebInspector.installDragHandle(this._rightResizeElement, this._resizerElemen
tStartDragging.bind(this), this._rightResizeElementDragging.bind(this), null, "e
w-resize"); | 178 WebInspector.installDragHandle(this._rightResizeElement, this._resizerElemen
tStartDragging.bind(this), this._rightResizeElementDragging.bind(this), null, "e
w-resize"); |
| 179 this.setEnabled(true); | 179 this.setEnabled(true); |
| 180 } | 180 } |
| 181 | 181 |
| 182 /** @enum {symbol} */ |
| 182 WebInspector.OverviewGrid.Events = { | 183 WebInspector.OverviewGrid.Events = { |
| 183 WindowChanged: "WindowChanged", | 184 WindowChanged: Symbol("WindowChanged"), |
| 184 Click: "Click" | 185 Click: Symbol("Click") |
| 185 } | 186 } |
| 186 | 187 |
| 187 WebInspector.OverviewGrid.Window.prototype = { | 188 WebInspector.OverviewGrid.Window.prototype = { |
| 188 reset: function() | 189 reset: function() |
| 189 { | 190 { |
| 190 this.windowLeft = 0.0; | 191 this.windowLeft = 0.0; |
| 191 this.windowRight = 1.0; | 192 this.windowRight = 1.0; |
| 192 this._leftResizeElement.style.left = "0%"; | 193 this._leftResizeElement.style.left = "0%"; |
| 193 this._rightResizeElement.style.left = "100%"; | 194 this._rightResizeElement.style.left = "100%"; |
| 194 this.setEnabled(true); | 195 this.setEnabled(true); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 position = Math.max(0, Math.min(position, this._width)); | 460 position = Math.max(0, Math.min(position, this._width)); |
| 460 if (position < this._startPosition) { | 461 if (position < this._startPosition) { |
| 461 this._windowSelector.style.left = position + "px"; | 462 this._windowSelector.style.left = position + "px"; |
| 462 this._windowSelector.style.right = this._width - this._startPosition
+ "px"; | 463 this._windowSelector.style.right = this._width - this._startPosition
+ "px"; |
| 463 } else { | 464 } else { |
| 464 this._windowSelector.style.left = this._startPosition + "px"; | 465 this._windowSelector.style.left = this._startPosition + "px"; |
| 465 this._windowSelector.style.right = this._width - position + "px"; | 466 this._windowSelector.style.right = this._width - position + "px"; |
| 466 } | 467 } |
| 467 } | 468 } |
| 468 } | 469 } |
| OLD | NEW |