OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project 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 "use strict"; | 5 "use strict"; |
6 | 6 |
7 class View { | 7 class View { |
8 constructor(id, broker) { | 8 constructor(id, broker) { |
9 this.divElement = d3.select("#" + id); | 9 this.divElement = d3.select("#" + id); |
10 this.divNode = this.divElement[0][0]; | 10 this.divNode = this.divElement[0][0]; |
11 this.parentNode = this.divNode.parentNode; | 11 this.parentNode = this.divNode.parentNode; |
12 this.hide(); | |
13 } | 12 } |
14 | 13 |
15 isScrollable() { | 14 isScrollable() { |
16 return false; | 15 return false; |
17 } | 16 } |
18 | 17 |
19 show(data, rememberedSelection) { | 18 show(data, rememberedSelection) { |
20 this.parentNode.appendChild(this.divElement[0][0]); | 19 this.parentNode.appendChild(this.divElement[0][0]); |
21 this.initializeContent(data, rememberedSelection); | 20 this.initializeContent(data, rememberedSelection); |
22 this.resizeToParent(); | 21 this.resizeToParent(); |
(...skipping 14 matching lines...) Expand all Loading... |
37 hide() { | 36 hide() { |
38 this.divElement.attr(VISIBILITY, 'hidden'); | 37 this.divElement.attr(VISIBILITY, 'hidden'); |
39 this.deleteContent(); | 38 this.deleteContent(); |
40 this.parentNode.removeChild(this.divNode); | 39 this.parentNode.removeChild(this.divNode); |
41 } | 40 } |
42 | 41 |
43 detachSelection() { | 42 detachSelection() { |
44 return null; | 43 return null; |
45 } | 44 } |
46 } | 45 } |
OLD | NEW |