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

Style Improvements #9

Merged
merged 13 commits into from
Dec 5, 2016
Merged

Style Improvements #9

merged 13 commits into from
Dec 5, 2016

Conversation

GHLasse
Copy link
Contributor

@GHLasse GHLasse commented Aug 5, 2016

Several style improvements making the font size equal to other modules and allowing for different style options to be set, some shown below:
mm_lt_sample_veryshort
mm_lt_sample_short
mm_lt_sample_verylong

This fixes issue #5, #6 and #8

Explanation of config variables:

  • maximumEntries: maximum number of routes to show (default: 3)
  • displayStationLength: number fo characters of the departure station for each transport mode to display. 0 means display all, -1 means don't show the departure station (default: 0)
  • displayWalk: boolean if steps for walking should be shown (default: true)
  • maxWalkTime: maximum time you are willing to walk between stations in minutes (default: 15)
  • fade: boolean if a fade should be applied - same as for calendar module (default: true)
  • fadePoint: percentage, where the fade should start. This should be a value between 0 and 1 - same as for calendar module (default: 0.3)
  • animationSpeed: speed of update animation in seconds (default: 1)
  • updateInterval: interval at which to request new routes from google api in minutes. Note that the module refreshes every 15seconds to always display an accurate estimate when you need to leave. (default: 5)
  • language: language to display information in - german 'de' or english 'en' (default is same as defined in the main config file)
  • units: units to use - metric or imperial (default is same as in the main config file)
  • timeFormat: 24 or 12 hour clock for displaying the arrival time (default same as in the main config file)

GHLasse added 5 commits August 5, 2016 15:24
changed font size to match other modules;
changed language and units option to be taken from default;
added configuration option to display walking steps;
added configuration option to display the departure station;
added display of arrival time in default time format;
added sorting of alternative routes by arrival time;
added exclusion of alternatives based on walking time;
added fading with parameters identical to the default calendar module;
changed update to update time every 15sec, but only pull new routes from google every x minutes as specified by config
made symbols smaller to match smaller font size
added english dictionary
replaced “this.data;” with “this.response;” in all its (3) occurrences in localtransport.js, following POIMann in issue CFenner#5 from 6th Jun, 2016
quick fix of bug, so that departure stations can be displayed
@tombamber
Copy link

Hey, how do I install it with these new improvements? I tried replacing the code with this code and the magic mirror did not display at all - just a black screen.

Thanks :)

@GHLasse
Copy link
Contributor Author

GHLasse commented Sep 4, 2016

Can you pull the latest code from my site? I remember there was some minor bug in this merge request, but it should only really cause issues with a specific setting (which is being ignored because of the bug). Long story short I fixed it but forgot to set up another merge request... Could be the bug was more serious than I thought?

@GHLasse
Copy link
Contributor Author

GHLasse commented Sep 4, 2016

Seems like GitHub is linking to the latest version of my fork already.
the essential change was in the main code:
}else if (this.config.displayStationLength = 0){ changed to
}else if (this.config.displayStationLength == 0){

Can you check that you set all the parameters required and that the error is not from another change you made? Can you send me the options you have set (you can leave the API key blank or as XXX - I will replace it with my own to test...)

different previews to show various options
added maxModuleWidth, displayArrival, displayWalkType, made sure all times are displayed in according language
@GHLasse
Copy link
Contributor Author

GHLasse commented Sep 4, 2016

Currently updating some things to make sure I didn't accidentally leave the repository in an old state. Therefore the latest version now probably doesn't work, as some translation strings are missing. Will upload the rest as soon as I have time again. (remind me if I stay silent for too long ;-) )

@GHLasse
Copy link
Contributor Author

GHLasse commented Sep 5, 2016

ok, that should be all :-D
even more options than before - check out the readme for details...

@tombamber
Copy link

Maybe I add the code wrong. I simply replaced the code you wrote on this page with the original, is that correct?

Is there an easier way to install it through the terminal? I'm sorry, I'm quite new to this.

@GHLasse
Copy link
Contributor Author

GHLasse commented Sep 5, 2016

If you replaced ALL the original files with mine AND added the files I added AND updated your config file, then you should be fine :-D
You should be able to pull from my repository I would assume. Same procedure as what you did to get CFenners code running...
cd MagicMirror
git clone https://github.com/GHLasse/MagicMirror-LocalTransport-Module.git modules/localtransport

@CFenner
Copy link
Owner

CFenner commented Sep 20, 2016

Is this in a state I can simply merge it?

@GHLasse
Copy link
Contributor Author

GHLasse commented Oct 27, 2016

@CFenner yes, should be :-)

@CFenner CFenner merged commit 867168e into CFenner:master Dec 5, 2016
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

Successfully merging this pull request may close these issues.

3 participants