nickcam / FlareClusterLayer

ArcGIS javascript custom graphics layer. Create clusters...with flares.
https://flareclusterlayer.azurewebsites.net/index_v4.html
MIT License
134 stars 51 forks source link

Upgrading to ArcGis 4.19, cluster text occasionally does not show up on cluster symbol #71

Open afillip opened 3 years ago

afillip commented 3 years ago

From what I can tell, it's pretty random when the text symbol shows up or doesn't. I've found that the text symbol is being set correctly, it's just not showing up... maybe a z-index issue? This may be something we can fix on our end, but just wanted to make y'all aware incase others have run into this and can maybe be fixed on your end. Thanks.

Screen Shot 2021-06-01 at 11 07 56 AM Screen Shot 2021-06-01 at 11 07 34 AM Screen Shot 2021-06-01 at 11 07 44 AM
nickcam commented 3 years ago

Hi @afillip - I haven't been keeping the up to date with the esri js api versions as I haven't been using the api or this layer in a while. I think you're right, it's most likely a z-index issue on the text element.

If you want to fix it and submit a PR feel free to do so :).

Could be as simple as adding a higher z-index to cluster-text class.

If not somewhere around and below this line might need to change to sort out how the elements are ordered. https://github.com/nickcam/FlareClusterLayer/blob/1ad1e5100e09b8b366d57a548552a92261258f8f/typescript/FlareClusterLayer_v4.ts#L834

Could also be a change in the api with how the preview html element is returned in this function, in which case it would need to be updated.

https://github.com/nickcam/FlareClusterLayer/blob/1ad1e5100e09b8b366d57a548552a92261258f8f/typescript/FlareClusterLayer_v4.ts#L843

Cool styles on your clusters as well!

afillip commented 3 years ago

Thank you, I like them too! Was all our designer's choice, but I appreciate it :)

And thanks for such a quick turnaround on the tips, i'll try them out and submit a PR if I find a solution!

apaleja commented 3 years ago

@afillip I am also thinking about moving to ArcGis 4.19. how did you manage dojo dependency ?

@nickcam any planning to update to 4.19 without dojo ?

afillip commented 3 years ago

Hey @apaleja, we upgraded to ArcGis 4.19 but are not using their new modules yet. It was just going to be too much work replacing all the dojo dependencies with the new modules, so we're waiting until we have a little more bandwidth.

apaleja commented 3 years ago

@afillip we are planning to upgrade to 4.19. and also we are not using dojo anywhere in the project but this library uses dojo which I think will be an issue. Any pointers ? We are using webpack and react.

nickcam commented 3 years ago

Hi @afillip and @apaleja, I didn't know esri had removed the dependency on dojo...it's about time I reckon!

Last I heard it was going to move to dojo2....or maybe it already had, I don't know 🤷‍♂️.

Anyway the dojo modules used in the layer are only there as dojo was being loaded by the api anyway so I used them as helpers to do some DOM manipulation. I don't think there's dojo related stuff in there that couldn't be swapped for vanilla javascript with a few more lines of code. Would have to confirm that though.

If I get some time I'll take a look as it would be good to ditch dojo and upgrade to the latest version, but no guarantees on when or if that would happen. Happy to review and accept PR's though 😄.