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

Added new layerIds option to layerControl configuration. #477

Merged

Conversation

tmcgee
Copy link
Member

@tmcgee tmcgee commented Nov 6, 2015

This array determines which sublayer and folder controls are visible.
The visibility of the actual sublayers is not affected.

Also includes layerIds array in imageParameters to demonstrate how to
set the initial visibility of sublayers.

This array determines which sublayer and folder controls are visible.
The visibility of the actual sublayers is not affected.

Also includes `layerIds` array in imageParameters to demonstrate how to
set the initial visibility of sublayers.
@@ -35,6 +35,10 @@ define([
_expandClickHandler: null,
postCreate: function () {
this.inherited(arguments);
// Should the control be visible or hidden?
if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) {
Copy link
Member

Choose a reason for hiding this comment

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

There is a potential issue here with array.indexOf(). It is only supported in IE 9+ this breaks in IE 8 and below. I will approve for now but lets look at using dojo/array.indexOf() that will abstract this issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

@DavidSpriggs you are correct and I will add the fix. I believe I saw indexOf used this way in some other widget. I'll track down that instance as well.

DavidSpriggs added a commit that referenced this pull request Nov 23, 2015
…and-folders

Added new `layerIds` option to layerControl configuration.
@DavidSpriggs DavidSpriggs merged commit fc226dd into develop Nov 23, 2015
@tmcgee tmcgee added this to the v1.4.0 milestone Nov 23, 2015
@DavidSpriggs DavidSpriggs deleted the feature/layerControl-hide-sublayers-and-folders branch November 25, 2015 17:40
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