Skip to content

Tests and improvements#4

Open
MattiSG wants to merge 8 commits into
CBeloch:masterfrom
MattiSG:master
Open

Tests and improvements#4
MattiSG wants to merge 8 commits into
CBeloch:masterfrom
MattiSG:master

Conversation

@MattiSG
Copy link
Copy Markdown

@MattiSG MattiSG commented Nov 14, 2010

Hi Christopher,

Here are some improvements I made to Locate :)

They are all keeping compatibility with your original code, but I would recommend that you take a look at my MSG branch, which breaks compatibility with Locate < 1.3, but is IMHO cleaner (still needs improvements over address getting, but since we have dependencies to Google Maps anyway, I'm thinking about extracting this into yet another file and use Gmaps API v3).

I'm not sure if you had tested your distanceTo() method, but according to my test file your original version does not calculate properly… Again, if you can confirm this, please consider integrating my MSG branch :)

Thanks for the original code!

Greetings,
Matti

…rly.

Set default value of loi to false (displays a modal to Safari users for example).
Improved and formalized error handling.
Options will be refactored in another branch.
…() after init, removes an error case and decreases code), renamed "options.positionOptions" to "options.position" and renamed "watcher" to "observe" (verbal forms are better but "watch" is forbidden according to original author).

Uniformized documentation and made it more concise.
Refactored and optimized code.
Updated and improved documentation.
Made the locate() and watcher() methods chainable.

Merge branch 'options'
@CBeloch
Copy link
Copy Markdown
Owner

CBeloch commented Nov 16, 2010

Hi,
I'll take a look at your changes and may merge them into the original Locate.js.
The first things I've seen were good changes, but I have to take a closer look at everything when I have more time.
I've made some tests to the distanceTo() as far as I could (testing it with the distance to work etc) and it looked quite good, but I could recheck this and maybe check the distance between 2 clients etc :)

Thank you for your changes!
People like you are why I love to work open-source =)

I will give you a hint (and credits) when I merge everything together!

Greetings,
Chris

@MattiSG
Copy link
Copy Markdown
Author

MattiSG commented Nov 16, 2010

Woops, I just realized that I had messed up with my branches!!
The pull request I sent includes most of my MSG branch changes, which are my own take to the implementation (even though they are sent with justification); please consider this as optional, it's really up to you to decide whether you want my refactor to make it to your master :)

The pull request should concern only my master branch up to commit 38d9053d4956f2b30df3, plus the 653070eb9c59f3b6f7b4 commit that adds tests. I won't clean this up immediately, in case you decide to include my MSG changes, but I am really not trying to force this on you, you can decide to merge only the improvements, not my architectural considerations ;)

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.

2 participants