Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

The "center" variable can't use a "-" on his key name #23

Open
nmccready opened this issue Oct 29, 2015 · 5 comments
Open

The "center" variable can't use a "-" on his key name #23

nmccready opened this issue Oct 29, 2015 · 5 comments

Comments

@nmccready
Copy link
Contributor

From @moretti on June 4, 2014 13:13

What is the reason behind this check?

if (attrs.center.search('-') !== -1) {
  $log.error('The "center" variable can\'t use a "-" on his key name: "' + attrs.center + '".');

It breaks a configuration like this one:

<leaflet center="{'lat': 51.508515, 'lng':-0.1254872, 'zoom':12}"><leaflet>

Copied from original issue: tombatossals/angular-leaflet-directive#385

@nmccready
Copy link
Contributor Author

I did see this in the code base and thought it was interesting as well. @tombatossals thoughts?

@nmccready
Copy link
Contributor Author

From @simison on September 17, 2015 10:59

PS. A good reminder to comment code better. ;-)

@nmccready
Copy link
Contributor Author

Or better yet use a function with proper naming that explains what it does.

@nmccready
Copy link
Contributor Author

From @simison on September 17, 2015 13:12

Totally. 👍

@nmccready
Copy link
Contributor Author

Bumping this to 0.9.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant