-
-
Notifications
You must be signed in to change notification settings - Fork 59
/
group.view.ts
64 lines (52 loc) · 1.53 KB
/
group.view.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
namespace $.$$ {
export class $mol_plot_group extends $.$mol_plot_group {
@ $mol_mem
graphs_enriched() {
const graphs = this.graphs()
for( let graph of graphs ) {
graph.shift = ()=> this.shift()
graph.scale = ()=> this.scale()
graph.size_real = ()=> this.size_real()
graph.hue = ()=> this.hue()
graph.series_x = ()=> this.series_x()
graph.series_y = ()=> this.series_y()
graph.dimensions_pane = ()=> this.dimensions_pane()
graph.viewport = ()=> this.viewport()
graph.cursor_position = ()=> this.cursor_position()
graph.gap = ()=> this.gap()
graph.title = ()=> this.title()
graph.repos_x = val => this.repos_x( val )
graph.repos_y = val => this.repos_y( val )
}
return graphs
}
@ $mol_mem
dimensions() {
const graphs = this.graphs_enriched()
let next = new this.$.$mol_vector_2d(
$mol_vector_range_full.inversed,
$mol_vector_range_full.inversed
)
for( let graph of graphs ) {
next = next.expanded2(graph.dimensions())
}
return next
}
@ $mol_mem
graph_samples() {
return this.graphs_enriched().map( graph => graph.Sample() )
}
back() {
const graphs = this.graphs_enriched()
const next = [] as $mol_plot_graph[]
for( let graph of graphs ) next.push( ...graph.back() as $mol_plot_graph[])
return next
}
front() {
const graphs = this.graphs_enriched()
const next = [] as $mol_plot_graph[]
for( let graph of graphs ) next.push( ...graph.front() as $mol_plot_graph[])
return next
}
}
}