Removed all curves at given day
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
class DatesPopup extends HTMLElement{
|
||||
|
||||
static TIME = 0;
|
||||
static ALL = 1;
|
||||
static DAY = new Date(24*60*60*1000);
|
||||
|
||||
constructor(goToNowCallback, jumpCallback){
|
||||
@ -23,16 +21,11 @@ class DatesPopup extends HTMLElement{
|
||||
return [dateInputValue.getTime(), timeMs];
|
||||
}
|
||||
|
||||
doJumpAllCallback(){
|
||||
let dateTimeInput = this.getDateTimeInput();
|
||||
this.hide();
|
||||
this.jumpCallback(dateTimeInput[0], dateTimeInput[1], DatesPopup.ALL);
|
||||
}
|
||||
|
||||
doJumpTimeCallback(){
|
||||
doJumpCallback(){
|
||||
let dateTimeInput = this.getDateTimeInput();
|
||||
this.hide();
|
||||
this.jumpCallback(dateTimeInput[0], dateTimeInput[1], DatesPopup.TIME);
|
||||
this.jumpCallback(dateTimeInput[0], dateTimeInput[1]);
|
||||
}
|
||||
|
||||
convertTimeStringToTimestamp(formattedTime){
|
||||
@ -68,8 +61,7 @@ class DatesPopup extends HTMLElement{
|
||||
this.getElementsByTagName("img")[0].onclick = () => {this.hide();};
|
||||
this.getElementsByClassName("go-to-now-button")[0].onclick = () => {this.doGoToNowCallback();};
|
||||
this.getElementsByClassName("input-date")[0].max = new Date().toISOString().split("T")[0]; // sets the max to today (set only at app start)
|
||||
this.getElementsByClassName("jump-button-time")[0].onclick = () => {this.doJumpTimeCallback();};
|
||||
this.getElementsByClassName("jump-button-all")[0].onclick = () => {this.doJumpAllCallback();};
|
||||
this.getElementsByClassName("jump-button")[0].onclick = () => {this.doJumpCallback();};
|
||||
}
|
||||
|
||||
render(){
|
||||
@ -95,11 +87,7 @@ class DatesPopup extends HTMLElement{
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="jump-button-time">Curves at the given time</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="jump-button-all">All curves of the given day</button>
|
||||
<button class="jump-button">Jump</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user