| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.Object} | 7 * @extends {WebInspector.Object} |
| 8 */ | 8 */ |
| 9 WebInspector.ResizerWidget = function() | 9 WebInspector.ResizerWidget = function() |
| 10 { | 10 { |
| 11 WebInspector.Object.call(this); | 11 WebInspector.Object.call(this); |
| 12 | 12 |
| 13 this._isEnabled = true; | 13 this._isEnabled = true; |
| 14 this._elements = []; | 14 this._elements = []; |
| 15 this._installDragOnMouseDownBound = this._installDragOnMouseDown.bind(this); | 15 this._installDragOnMouseDownBound = this._installDragOnMouseDown.bind(this); |
| 16 this._cursor = "nwse-resize"; | 16 this._cursor = "nwse-resize"; |
| 17 }; | 17 }; |
| 18 | 18 |
| 19 /** @enum {symbol} */ |
| 19 WebInspector.ResizerWidget.Events = { | 20 WebInspector.ResizerWidget.Events = { |
| 20 ResizeStart: "ResizeStart", | 21 ResizeStart: Symbol("ResizeStart"), |
| 21 ResizeUpdate: "ResizeUpdate", | 22 ResizeUpdate: Symbol("ResizeUpdate"), |
| 22 ResizeEnd: "ResizeEnd" | 23 ResizeEnd: Symbol("ResizeEnd") |
| 23 }; | 24 }; |
| 24 | 25 |
| 25 WebInspector.ResizerWidget.prototype = { | 26 WebInspector.ResizerWidget.prototype = { |
| 26 /** | 27 /** |
| 27 * @return {boolean} | 28 * @return {boolean} |
| 28 */ | 29 */ |
| 29 isEnabled: function() | 30 isEnabled: function() |
| 30 { | 31 { |
| 31 return this._isEnabled; | 32 return this._isEnabled; |
| 32 }, | 33 }, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 sendDragMove: function(startX, currentX, startY, currentY, shiftKey) | 243 sendDragMove: function(startX, currentX, startY, currentY, shiftKey) |
| 243 { | 244 { |
| 244 if (this._isVertical) | 245 if (this._isVertical) |
| 245 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi
zeUpdate, { startPosition: startY, currentPosition: currentY, shiftKey: shiftKey
}); | 246 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi
zeUpdate, { startPosition: startY, currentPosition: currentY, shiftKey: shiftKey
}); |
| 246 else | 247 else |
| 247 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi
zeUpdate, { startPosition: startX, currentPosition: currentX, shiftKey: shiftKey
}); | 248 this.dispatchEventToListeners(WebInspector.ResizerWidget.Events.Resi
zeUpdate, { startPosition: startX, currentPosition: currentX, shiftKey: shiftKey
}); |
| 248 }, | 249 }, |
| 249 | 250 |
| 250 __proto__: WebInspector.ResizerWidget.prototype | 251 __proto__: WebInspector.ResizerWidget.prototype |
| 251 }; | 252 }; |
| OLD | NEW |