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

v0.8.6 Broke custom controls #874

Closed
adgoncal opened this issue Jul 29, 2015 · 11 comments
Closed

v0.8.6 Broke custom controls #874

adgoncal opened this issue Jul 29, 2015 · 11 comments

Comments

@adgoncal
Copy link

Hi,

I just noticed that 0.8.6 breaks custom controls.

In 'src/services/leafletControlHelpers.js', function isValidControlType is checking if the control is in controlTypes object, but 'custom' is not.

In 'src/directives/controls.js', it calls isValidControlType to check if the control is valid, but returns early on custom controls.

@MarkAPhillips
Copy link
Contributor

I have this problem also and had to revert back to 0.8.5

@nmccready
Copy link
Contributor

@elesdoar @tombatossals ?

@adgoncal @MarkAPhillips please checkout this PR as it changed. #831

My guess is we should have moved to 0.9.X

@sibbl
Copy link

sibbl commented Aug 4, 2015

There are more troubles than just isValidControlType("custom") not returning true as one could use an array of controls as value of the controls key custom in 0.8.5. This doesn't work anymore as well in 0.8.6. I guess this needs some more rewriting.

@MarkAPhillips
Copy link
Contributor

If there are issues in this, can it be reverted and then pushed when fully tested and documented into 0.9.0 rather than 0.8.6. I need to review the changes as in the current state it completely breaks my application. @tombatossals can you advise how this is to be addressed so I can decide how I should proceed. I do not mind reworking my control code but before I start if you intend to fix the issues in the next week will hold off until then - thanks.

@paambaati
Copy link

Stuck on the same boat; I'm working on a new app and I suppose I picked the exact wrong time to add a custom control - none of the examples work, and the documentation doesn't apply anymore. For now, I'm just hacking into the main distributable as a stop-gap, but it would be great if documentation at least shows 1 example with adding a new custom control.

@Diones
Copy link

Diones commented Aug 22, 2015

Exactly, the same here. Version 0.8.5 working fine.

@nmccready
Copy link
Contributor

@tombatossals should we go to 0.9.X and is controls working in a different manner now? #899

@nmccready
Copy link
Contributor

Also is there new documentation for this?

@tombatossals
Copy link
Owner

Hi, sorry I haven't used custom controls before, and there was no test nor example showing how they must work. I have solved the issue in the last commit, and added a new example of how to load a custom example.

@nmccready the controls works the same way as before, they were reworked to be able to extend and add new controls to the library easily, but maybe is a good moment to go to 0.9.x.

No new documentation needed, because they work as before (now at least).

@nmccready
Copy link
Contributor

Cool ty

@nmccready
Copy link
Contributor

Cutting a new release soon closing.

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

No branches or pull requests

7 participants