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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 if (dividersLabelBarElement) | 155 if (dividersLabelBarElement) |
156 WebInspector.installDragHandle(dividersLabelBarElement, this._startWindo
wDragging.bind(this), this._windowDragging.bind(this), null, "-webkit-grabbing",
"-webkit-grab"); | 156 WebInspector.installDragHandle(dividersLabelBarElement, this._startWindo
wDragging.bind(this), this._windowDragging.bind(this), null, "-webkit-grabbing",
"-webkit-grab"); |
157 | 157 |
158 this.windowLeft = 0.0; | 158 this.windowLeft = 0.0; |
159 this.windowRight = 1.0; | 159 this.windowRight = 1.0; |
160 | 160 |
161 this._parentElement.addEventListener("mousewheel", this._onMouseWheel.bind(t
his), true); | 161 this._parentElement.addEventListener("mousewheel", this._onMouseWheel.bind(t
his), true); |
162 this._parentElement.addEventListener("dblclick", this._resizeWindowMaximum.b
ind(this), true); | 162 this._parentElement.addEventListener("dblclick", this._resizeWindowMaximum.b
ind(this), true); |
163 | 163 |
164 this._overviewWindowElement = parentElement.createChild("div", "overview-gri
d-window"); | 164 this._overviewWindowElement = parentElement.createChild("div", "overview-gri
d-window"); |
165 this._overviewWindowElement.appendChild(WebInspector.View.createStyleElement
("ui_lazy/overviewGrid.css")); | 165 this._overviewWindowElement.appendChild(WebInspector.Widget.createStyleEleme
nt("ui_lazy/overviewGrid.css")); |
166 this._overviewWindowBordersElement = parentElement.createChild("div", "overv
iew-grid-window-rulers"); | 166 this._overviewWindowBordersElement = parentElement.createChild("div", "overv
iew-grid-window-rulers"); |
167 parentElement.createChild("div", "overview-grid-dividers-background"); | 167 parentElement.createChild("div", "overview-grid-dividers-background"); |
168 | 168 |
169 this._currentPositionElement = parentElement.createChild("div", "overview-gr
id-current-position"); | 169 this._currentPositionElement = parentElement.createChild("div", "overview-gr
id-current-position"); |
170 this._currentPositionArea = parentElement.createChild("div", "overview-grid-
window-area"); | 170 this._currentPositionArea = parentElement.createChild("div", "overview-grid-
window-area"); |
171 this._currentPositionArea.addEventListener("mousemove", this._onMouseMove.bi
nd(this), true); | 171 this._currentPositionArea.addEventListener("mousemove", this._onMouseMove.bi
nd(this), true); |
172 this._currentPositionArea.addEventListener("mouseout", this._hideCurrentPosi
tion.bind(this), true); | 172 this._currentPositionArea.addEventListener("mouseout", this._hideCurrentPosi
tion.bind(this), true); |
173 | 173 |
174 this._leftResizeElement = parentElement.createChild("div", "overview-grid-wi
ndow-resizer"); | 174 this._leftResizeElement = parentElement.createChild("div", "overview-grid-wi
ndow-resizer"); |
175 this._leftResizeElement.style.left = 0; | 175 this._leftResizeElement.style.left = 0; |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 position = Math.max(0, Math.min(position, this._width)); | 494 position = Math.max(0, Math.min(position, this._width)); |
495 if (position < this._startPosition) { | 495 if (position < this._startPosition) { |
496 this._windowSelector.style.left = position + "px"; | 496 this._windowSelector.style.left = position + "px"; |
497 this._windowSelector.style.right = this._width - this._startPosition
+ "px"; | 497 this._windowSelector.style.right = this._width - this._startPosition
+ "px"; |
498 } else { | 498 } else { |
499 this._windowSelector.style.left = this._startPosition + "px"; | 499 this._windowSelector.style.left = this._startPosition + "px"; |
500 this._windowSelector.style.right = this._width - position + "px"; | 500 this._windowSelector.style.right = this._width - position + "px"; |
501 } | 501 } |
502 } | 502 } |
503 } | 503 } |
OLD | NEW |