-
Notifications
You must be signed in to change notification settings - Fork 322
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
Formatting #27
Formatting #27
Conversation
- Only use one var when possible - Define one var on each line (child1N) - Avoid comments on 2 lines for a few chars - Remove unecessary empty lines
No code change. Only replace tabulations. Thx Notepad2
Ability to put breakpoints into setTimeout functions
var sTime = new Date(); | ||
var result = astar.search(graph, start, end, options); | ||
var eTime = new Date(); | ||
start = graph.grid[start[0]][start[1]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing var
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh never mind - I see what you are doing with reusing the parameter now
Awesome! I've also updated the test harness for more strict checking in jshint |
Two notes:
Instead of
Since it wouldn't line up nicely anymore |
Hello. Thanks for the congrats and the merge. Regarding your notes:
Moreover, either you use the default Graph, or completely bypass it with another one (ex: So it might be interesting not to pollute global scope with Graph. That's also breaking change. I'd just realized we've also made some other breaking changes recently (.getCost(), .weight, start & end nodes vs pos object, .neighbors(), ...). Regarding API, yeah I got the feeling something better than Graph/CityGraph/CustomGraph is probably achievable but that good enough for a very specific lib. And I don't really see a better structure for now.
|
One thing you might probably know already: https://github.com/rwaldron/idiomatic.js/
isn't lined up but that's all right |
I don't feel too strongly about the whitespace here, but I think the |
Code formatting.
Modifications are in demo.js.
Especially the Fix .cost vs .getCost().