Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change the Height of schedule #17

Open
Laloses opened this issue May 4, 2020 · 0 comments
Open

Cannot change the Height of schedule #17

Laloses opened this issue May 4, 2020 · 0 comments

Comments

@Laloses
Copy link

Laloses commented May 4, 2020

I´ve trying to make the schedule more rectangular, but I couldn´t find a way in the so I figure it out by changing the Main.js code a little bit and adding one thing in the Style.css.
If there other way to do it pls tell me hehe

First I changed the line 9 on the Main.js:
this.topInfoElement = this.element.getElementsByClassName('cd-schedule__top-info')[0];
For this:
this.topInfoElement = this.element.getElementsByClassName('cd-schedule__timeline')[0].children[0].children[0];
In this way the formula slotHeight*duration/self.timelineUnitDuration would take the true height of the row and leave the headers with their own height.

Now, to make the row lower just add a CSS class to the <li> in the cd-schedule__timeline to make it lower, or bigger. Also I was thinking on putting different sizes like smallest, smaller, small, normal (default)... and the bigger ones.
But I only add this to the style:
.cd-schedule__timeline .small{ height: 30px !important; }
I had put !important because I leave the height that was already in the file.

then just especify the height of the rows like this:
<div class="cd-schedule__timeline">
<ul>
<li class="small"><span>08:00</span></li>
<li class="small"><span>09:00</span></li>
<li class="small"><span>10:00</span></li>
</ul> </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant