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

attempt to fix issue #46 #47

Merged
merged 8 commits into from
Jul 26, 2017
Merged

attempt to fix issue #46 #47

merged 8 commits into from
Jul 26, 2017

Conversation

solsticedhiver
Copy link
Contributor

my attempt to fix an issue with synCursor that breaks with more than 2 maps and unsynced.

* This will able us to correctly track its use
* When unsyncing 2 maps in a set of 3, cursor disappear on map not unsynced.
* This fixes this by removing the cursor from the list of _cursors to follow
(using the previous commit) and not remove the cursor on the synced map (because it might used
by another map) and its callback
@jieter
Copy link
Owner

jieter commented Jul 15, 2017

Thanks for the fix, travis ci reports a style issue, I'll merge next week if you fixed that

@jjimenezshaw jjimenezshaw mentioned this pull request Jul 15, 2017
6 tasks
@solsticedhiver
Copy link
Contributor Author

I have also added a line to hide cursor when unsyncing to mimick previous behavior. This is questionnable. Tell me what you think about it.

@jjimenezshaw
Copy link
Contributor

@solsticedhiver due to another merge into master, now there are conflicts on this PR (I don't know if you get an email automatically). See that some events were organized in that other merge.

@solsticedhiver
Copy link
Contributor Author

@jjimenezshaw Ok. I have merged the conflict.

if (this._cursors) {
this._cursors.forEach(function (cursor, indx, _cursors) {
if (cursor === map.cursor) {
_cursors.splice(indx, 1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a semicolon here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jieter you are right... but eslint has not detected it (tests are ok). Shouldn't be eslint configuration more strict? (sure, this is for another PR, not now)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I agree. I also noticed some other oddities in unchanged lines, we should have a look at that. I can fix this line then too, so merging ;)

@jieter jieter merged commit 9383b12 into jieter:master Jul 26, 2017
@jieter
Copy link
Owner

jieter commented Jul 26, 2017

@solsticedhiver merged, thanks!

@jieter
Copy link
Owner

jieter commented Jul 26, 2017

released leaflet.sync@0.2.1

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.

None yet

3 participants