mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
app timeline: removed outdate unused code
This commit is contained in:
parent
35a383c457
commit
75a1cc3ffd
File diff suppressed because one or more lines are too long
@ -36,22 +36,6 @@ export default{
|
|||||||
props: ["period", "highlight"],
|
props: ["period", "highlight"],
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
// TODO: remove widths (now using flex css for width calculation)
|
|
||||||
subPeriodBoxWidths: {// in pixels
|
|
||||||
[PywbPeriod.Type.year]: 80, // year box
|
|
||||||
[PywbPeriod.Type.month]: 80, // month box in year
|
|
||||||
[PywbPeriod.Type.day]: 20, // days box in month
|
|
||||||
[PywbPeriod.Type.hour]: 60, // hour box in day
|
|
||||||
[PywbPeriod.Type.snapshot]: 10 // snapshot box in hour/day
|
|
||||||
},
|
|
||||||
// TODO: remove widths (now using flex css for width calculation)
|
|
||||||
emptySubPeriodBoxWidths: {// in pixels
|
|
||||||
[PywbPeriod.Type.year]: 40, // year box
|
|
||||||
[PywbPeriod.Type.month]: 40, // month box in year
|
|
||||||
[PywbPeriod.Type.day]: 20, // days box in month
|
|
||||||
[PywbPeriod.Type.hour]: 40, // hour box in day
|
|
||||||
[PywbPeriod.Type.snapshot]: 20 // snapshot box in hour/day
|
|
||||||
},
|
|
||||||
highlightPeriod: null,
|
highlightPeriod: null,
|
||||||
previousPeriod: null,
|
previousPeriod: null,
|
||||||
nextPeriod: null,
|
nextPeriod: null,
|
||||||
@ -66,21 +50,12 @@ export default{
|
|||||||
this.$refs.periods._computedStyle = window.getComputedStyle(this.$refs.periods);
|
this.$refs.periods._computedStyle = window.getComputedStyle(this.$refs.periods);
|
||||||
this.$refs.periodScroll._computedStyle = window.getComputedStyle(this.$refs.periodScroll);
|
this.$refs.periodScroll._computedStyle = window.getComputedStyle(this.$refs.periodScroll);
|
||||||
this.$watch("period", this.onPeriodChanged);
|
this.$watch("period", this.onPeriodChanged);
|
||||||
// TODO: remove widths (now using flex css for width calculation), so we don't need manual calc
|
|
||||||
//this.adjustScrollElWidth();
|
|
||||||
|
|
||||||
this.$refs.periodScroll.addEventListener("scroll", this.updateScrollArrows);
|
this.$refs.periodScroll.addEventListener("scroll", this.updateScrollArrows);
|
||||||
window.addEventListener("resize", this.updateScrollArrows);
|
window.addEventListener("resize", this.updateScrollArrows);
|
||||||
this.updateScrollArrows();
|
this.updateScrollArrows();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
subPeriodBoxWidth: function() {
|
|
||||||
return this.subPeriodBoxWidths[this.period.type+1]; // the type of the period children
|
|
||||||
},
|
|
||||||
// TODO: remove widths (now using flex css for width calculation)
|
|
||||||
emptySubPeriodBoxWidth: function() {
|
|
||||||
return this.emptySubPeriodBoxWidths[this.period.type+1]; // the type of the period children
|
|
||||||
},
|
|
||||||
// this determins which the last zoom level is before we go straight to showing snapshot
|
// this determins which the last zoom level is before we go straight to showing snapshot
|
||||||
isLastZoomLevel() {
|
isLastZoomLevel() {
|
||||||
return this.period.type === PywbPeriod.Type.day;
|
return this.period.type === PywbPeriod.Type.day;
|
||||||
@ -162,15 +137,9 @@ export default{
|
|||||||
}).bind(this), 2000);
|
}).bind(this), 2000);
|
||||||
}
|
}
|
||||||
setTimeout((function() {
|
setTimeout((function() {
|
||||||
// TODO: remove widths (now using flex css for width calculation), so we don't need manual calc
|
|
||||||
//this.adjustScrollElWidth();
|
|
||||||
this.restoreScroll();
|
this.restoreScroll();
|
||||||
this.updateScrollArrows();
|
this.updateScrollArrows();
|
||||||
}).bind(this), 1);
|
}).bind(this), 1);
|
||||||
},
|
|
||||||
// TODO: remove widths (now using flex css for width calculation), so we don't need manual calc
|
|
||||||
adjustScrollElWidth() {
|
|
||||||
//this.$refs.periodScroll.style.maxWidth = this.$refs.periods._computedStyle.width;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user