aesthetic fixes

This commit is contained in:
Lachlan Kermode
2022-03-03 21:30:50 -05:00
parent 723c4b7007
commit bc2f5606bf
4 changed files with 33 additions and 32 deletions

View File

@@ -161,7 +161,7 @@
"Other" "Other"
], ],
"info": "Seeing events that occurred between", "info": "Seeing events that occurred between",
"default_categories_label": "Events" "default_categories_label": "Last 12 Days"
}, },
"cardstack": { "cardstack": {
"header": "selected events", "header": "selected events",

View File

@@ -34,14 +34,14 @@ class TimelineAxis extends React.Component {
if (this.props.scaleX) { if (this.props.scaleX) {
this.x0 = d3 this.x0 = d3
.axisBottom(this.props.scaleX) .axisBottom(this.props.scaleX)
.ticks(5) .ticks(15)
.tickPadding(0) .tickPadding(0)
.tickSize(contentHeight - TEXT_HEIGHT - marginTop) .tickSize(contentHeight - TEXT_HEIGHT - marginTop)
.tickFormat(d3.timeFormat(fstFmt)); .tickFormat(d3.timeFormat(fstFmt));
this.x1 = d3 this.x1 = d3
.axisBottom(this.props.scaleX) .axisBottom(this.props.scaleX)
.ticks(5) .ticks(15)
.tickPadding(marginTop) .tickPadding(marginTop)
.tickSize(0) .tickSize(0)
.tickFormat(d3.timeFormat(sndFmt)); .tickFormat(d3.timeFormat(sndFmt));

View File

@@ -130,7 +130,7 @@ class Timeline extends React.Component {
} }
onClickArrow() { onClickArrow() {
this.setState((prevState, props) => { this.setState((prevState) => {
return { isFolded: !prevState.isFolded }; return { isFolded: !prevState.isFolded };
}); });
} }

View File

@@ -3,34 +3,35 @@ import React from "react";
const TimelineHandles = ({ dims, onMoveTime }) => { const TimelineHandles = ({ dims, onMoveTime }) => {
const transform = "scale(1.5,1.5)"; const transform = "scale(1.5,1.5)";
const size = 45; const size = 45;
return ( return null;
<g className="time-controls-inline"> // return (
<g // <g className="time-controls-inline">
transform={`translate(${dims.marginLeft - 20}, ${ // <g
dims.contentHeight - 10 // transform={`translate(${dims.marginLeft - 20}, ${
})`} // dims.contentHeight - 10
onClick={() => onMoveTime("backwards")} // })`}
> // onClick={() => onMoveTime("backwards")}
<circle r={size} /> // >
<path // <circle r={size} />
d="M0,-7.847549217020565L6.796176979388489,3.9237746085102825L-6.796176979388489,3.9237746085102825Z" // <path
transform={`rotate(270) ${transform}`} // d="M0,-7.847549217020565L6.796176979388489,3.9237746085102825L-6.796176979388489,3.9237746085102825Z"
/> // transform={`rotate(270) ${transform}`}
</g> // />
<g // </g>
transform={`translate(${dims.width - dims.width_controls + 20}, ${ // <g
dims.contentHeight - 10 // transform={`translate(${dims.width - dims.width_controls + 20}, ${
})`} // dims.contentHeight - 10
onClick={() => onMoveTime("forward")} // })`}
> // onClick={() => onMoveTime("forward")}
<circle r={size} /> // >
<path // <circle r={size} />
d="M0,-7.847549217020565L6.796176979388489,3.9237746085102825L-6.796176979388489,3.9237746085102825Z" // <path
transform={`rotate(90) ${transform}`} // d="M0,-7.847549217020565L6.796176979388489,3.9237746085102825L-6.796176979388489,3.9237746085102825Z"
/> // transform={`rotate(90) ${transform}`}
</g> // />
</g> // </g>
); // </g>
// );
}; };
export default TimelineHandles; export default TimelineHandles;