Skip to content

Commit

Permalink
update style
Browse files Browse the repository at this point in the history
  • Loading branch information
1999foxes committed May 31, 2021
1 parent 2d5452b commit 2b1b4b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions babel_src/chartTimelineZoomable.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ class ChartTimelineZoomable {
.attr('fill', 'white');

this.monthLabel
.attr('text-anchor', 'middle')
.attr('text-anchor', 'start')
.attr('alignment-baseline', 'middle')
.attr('transform', 'translate(' + margin.left + ' ' + (height - margin.bottom - 40) + ') scale(1.5)')
.attr('transform', 'translate(' + (width * 0.03) + ' ' + (height - margin.bottom - 40) + ') scale(1.5)')
.text(isChoosingMonth? '' : defaultDate.getMonth()+1+'月');

this.cityLabel
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/chartTimelineZoomable.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ var ChartTimelineZoomable = function () {
// update chart content
this.backgroudLine.attr('transform', 'translate(' + margin.left + ' ' + (height - margin.bottom) + ')').attr('width', width - margin.right - margin.left).attr('height', '1').attr('fill', 'white');

this.monthLabel.attr('text-anchor', 'middle').attr('alignment-baseline', 'middle').attr('transform', 'translate(' + margin.left + ' ' + (height - margin.bottom - 40) + ') scale(1.5)').text(isChoosingMonth ? '' : defaultDate.getMonth() + 1 + '月');
this.monthLabel.attr('text-anchor', 'start').attr('alignment-baseline', 'middle').attr('transform', 'translate(' + width * 0.03 + ' ' + (height - margin.bottom - 40) + ') scale(1.5)').text(isChoosingMonth ? '' : defaultDate.getMonth() + 1 + '月');

this.cityLabel.attr('text-anchor', 'start').attr('alignment-baseline', 'middle').attr('transform', 'translate(' + (margin.left + 100) + ' ' + (height - margin.bottom - 40) + ') scale(1)').text(city.province == null ? '' : city.province + ' ' + city.city);

Expand Down
16 changes: 7 additions & 9 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,6 @@ li{
height: auto;
z-index: 10;
}
#mode-selector>select{
background:none;
width: 10vw;
margin: 5px;
line-height:28px;
border: none;
text-align: left;
font-size: 2.5vw;
}

.btn-dirt.selected, .btn-attr.selected {
outline: none;
Expand Down Expand Up @@ -280,5 +271,12 @@ li{
}

#year-select {
background:none;
width: 10vw;
margin: 5px;
line-height:28px;
border: none;
text-align: left;
font-weight: bold;
font-size: 3.2vw;
}

0 comments on commit 2b1b4b3

Please sign in to comment.