| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 /** | 272 /** |
| 273 * @param {!Event} event | 273 * @param {!Event} event |
| 274 * @return {boolean} | 274 * @return {boolean} |
| 275 */ | 275 */ |
| 276 _startWindowDragging: function(event) | 276 _startWindowDragging: function(event) |
| 277 { | 277 { |
| 278 this._dragStartPoint = event.pageX; | 278 this._dragStartPoint = event.pageX; |
| 279 this._dragStartLeft = this.windowLeft; | 279 this._dragStartLeft = this.windowLeft; |
| 280 this._dragStartRight = this.windowRight; | 280 this._dragStartRight = this.windowRight; |
| 281 event.stopPropagation(); |
| 281 return true; | 282 return true; |
| 282 }, | 283 }, |
| 283 | 284 |
| 284 /** | 285 /** |
| 285 * @param {!Event} event | 286 * @param {!Event} event |
| 286 */ | 287 */ |
| 287 _windowDragging: function(event) | 288 _windowDragging: function(event) |
| 288 { | 289 { |
| 289 event.preventDefault(); | 290 event.preventDefault(); |
| 290 var delta = (event.pageX - this._dragStartPoint) / this._parentElement.c
lientWidth; | 291 var delta = (event.pageX - this._dragStartPoint) / this._parentElement.c
lientWidth; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 position = Math.max(0, Math.min(position, this._width)); | 457 position = Math.max(0, Math.min(position, this._width)); |
| 457 if (position < this._startPosition) { | 458 if (position < this._startPosition) { |
| 458 this._windowSelector.style.left = position + "px"; | 459 this._windowSelector.style.left = position + "px"; |
| 459 this._windowSelector.style.right = this._width - this._startPosition
+ "px"; | 460 this._windowSelector.style.right = this._width - this._startPosition
+ "px"; |
| 460 } else { | 461 } else { |
| 461 this._windowSelector.style.left = this._startPosition + "px"; | 462 this._windowSelector.style.left = this._startPosition + "px"; |
| 462 this._windowSelector.style.right = this._width - position + "px"; | 463 this._windowSelector.style.right = this._width - position + "px"; |
| 463 } | 464 } |
| 464 } | 465 } |
| 465 }; | 466 }; |
| OLD | NEW |