OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * This view implements a vertically split display with a draggable divider. | 6 * This view implements a vertically split display with a draggable divider. |
7 * | 7 * |
8 * <<-- sizer -->> | 8 * <<-- sizer -->> |
9 * | 9 * |
10 * +----------------------++----------------+ | 10 * +----------------------++----------------+ |
11 * | || | | 11 * | || | |
12 * | || | | 12 * | || | |
13 * | || | | 13 * | || | |
14 * | || | | 14 * | || | |
15 * | leftView || rightView | | 15 * | leftView || rightView | |
16 * | || | | 16 * | || | |
17 * | || | | 17 * | || | |
18 * | || | | 18 * | || | |
19 * | || | | 19 * | || | |
20 * | || | | 20 * | || | |
21 * +----------------------++----------------+ | 21 * +----------------------++----------------+ |
22 * | 22 * |
23 * @param {!View} leftView The widget to position on the left. | 23 * @param {!View} leftView The widget to position on the left. |
24 * @param {!View} rightView The widget to position on the right. | 24 * @param {!View} rightView The widget to position on the right. |
25 * @param {!DivView} sizerView The widget that will serve as draggable divider. | 25 * @param {!DivView} sizerView The widget that will serve as draggable divider. |
26 */ | 26 */ |
27 var ResizableVerticalSplitView = (function() { | 27 var ResizableVerticalSplitView = (function() { |
| 28 'use strict'; |
| 29 |
28 // Minimum width to size panels to, in pixels. | 30 // Minimum width to size panels to, in pixels. |
29 const MIN_PANEL_WIDTH = 50; | 31 var MIN_PANEL_WIDTH = 50; |
30 | 32 |
31 // We inherit from View. | 33 // We inherit from View. |
32 var superClass = View; | 34 var superClass = View; |
33 | 35 |
34 /** | 36 /** |
35 * @constructor | 37 * @constructor |
36 */ | 38 */ |
37 function ResizableVerticalSplitView(leftView, rightView, sizerView) { | 39 function ResizableVerticalSplitView(leftView, rightView, sizerView) { |
38 // Call superclass's constructor. | 40 // Call superclass's constructor. |
39 superClass.call(this); | 41 superClass.call(this); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 140 |
139 this.sizerMouseMoveListener_ = null; | 141 this.sizerMouseMoveListener_ = null; |
140 this.sizerMouseUpListener_ = null; | 142 this.sizerMouseUpListener_ = null; |
141 | 143 |
142 event.preventDefault(); | 144 event.preventDefault(); |
143 } | 145 } |
144 }; | 146 }; |
145 | 147 |
146 return ResizableVerticalSplitView; | 148 return ResizableVerticalSplitView; |
147 })(); | 149 })(); |
OLD | NEW |