turn multiple layers off and turn one layer on
I am working on a pdf file and have gotten to work with hover states (mouse enter, mouse out) and mouse up/down
The one issue I'm running into is when I keep the state on (showing a layer) on click and making sure if I have any other layer I have previously selected is turned off.
I did do this by going through each layer and turning it off on mouse up, but I have a lot of layers and that can be a lot to do for each button. Is there an easier way?
I tried using on mouse up
var docOCGs = this.getOCGs();
for (var x=0; x < docOCGs.length; x++)
{
docOCGs
}
---- and then another action
var docOCGs = this.getOCGs();
for (var x=0; x < docOCGs.length; x++)
{
if(docOCGs
{
docOCGs
}
}
but it turned off all layers except DBC Natoinal. and there are some layers that I still want to show. I tried locking them, but they still become invisible. I even check "Always Visible" on the properties.
