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

Method panInsideBounds doesn't accept param in array form #200

Merged
merged 1 commit into from
May 28, 2015

Conversation

osvodef
Copy link
Contributor

@osvodef osvodef commented May 25, 2015

Если выполнить в консоли
map.panInsideBounds([ [54.9801, 82.8974], [54.9901, 82.9074] ]) получим

Uncaught TypeError: undefined is not a function

Если сделать так:

var southWest = DG.latLng(54.9801, 82.8974),
    northEast = DG.latLng(54.9901, 82.9074),
    bounds = DG.latLngBounds(southWest, northEast);
map.panInsideBounds(bounds);

То всё норм.
А в доке написано:

Все методы, которые принимают объекты LatLngBounds также принимают их в виде простого массива, то есть границы могут быть указаны как в этом примере:

map.fitBounds([
    [54.9801, 82.8974],
    [54.9901, 82.9074]
]);

@andymost
Copy link
Contributor Author

Та же проблема с методом map.getBoundsZoom()

@osvodef
Copy link
Contributor

osvodef commented May 25, 2015

getBoundsZoom пофиксил у нас.
panInsideBounds пофиксил в Лифлете: Leaflet/Leaflet#3489

@osvodef osvodef modified the milestones: Release 2.0.36, Backlog May 25, 2015
@osvodef osvodef self-assigned this May 25, 2015
@osvodef osvodef changed the title Method panInsideBounds don`t accept array of arrays like param Method panInsideBounds doesn't accept param in array form May 25, 2015
@Trufi
Copy link
Contributor

Trufi commented May 26, 2015

👍

1 similar comment
@ilfa
Copy link
Contributor

ilfa commented May 27, 2015

👍

@ilfa ilfa added Testing and removed CodeReview labels May 27, 2015
andymost added a commit that referenced this pull request May 28, 2015
Method panInsideBounds doesn't accept param in array form
@andymost andymost merged commit c11088b into master May 28, 2015
@andymost andymost removed the Testing label May 28, 2015
@andymost andymost deleted the fix/getboundszoom-array branch May 28, 2015 05:49
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.

4 participants