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"
],
"info": "Seeing events that occurred between",
"default_categories_label": "Events"
"default_categories_label": "Last 12 Days"
},
"cardstack": {
"header": "selected events",

View File

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

View File

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

View File

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