-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirection-button.js
More file actions
27 lines (27 loc) · 1.08 KB
/
direction-button.js
File metadata and controls
27 lines (27 loc) · 1.08 KB
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
export class DirectionButton {
constructor(direction, progressBar) {
this.progressBar = progressBar;
this.direction = direction;
if (direction == 'left') {
this.container = d3.select('#left-container')
.style('position', 'relative')
.style('box-sizing', 'border-box')
.attr('width', 300)
.attr('height', 30);
this.button = this.container.append('button')
.text('left')
//.on('click', console.log('blahblah'))
.on('click', () => progressBar.deterateProgressBar());
} else {
this.container = d3.select('#right-container')
.style('position', 'relative')
.style('box-sizing', 'border-box')
.attr('width', 300)
.attr('height', 30);
this.button = this.container.append('button')
.text('right')
//.on('click', console.log('blahblah'))
.on('click', () => progressBar.iterateProgressBar());
}
}
}