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

Event with change z-index not firing #12

Open
Merglodov opened this issue Aug 29, 2018 · 10 comments
Open

Event with change z-index not firing #12

Merglodov opened this issue Aug 29, 2018 · 10 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Merglodov
Copy link

Could you please add z-index update in onChangesOverride method?

@AckerApple
Copy link
Owner

I think you got the wrong package for this request. The code you seek already exists in the map package, I’m just html overlay package.

Code you seek:
https://github.com/SebastianM/angular-google-maps/blob/master/packages/core/directives/map.ts#L312

@AckerApple
Copy link
Owner

I see I have a zIndex input binding but it’s only read and never changes:
https://github.com/AckerApple/agm-overlays/blob/master/src/AgmOverlay.component.ts#L29

@Merglodov
Copy link
Author

Merglodov commented Aug 29, 2018

Yes, you right you have a binding without changes and z-index not changes dynamically

For example, I change z-index on pin hover, and if I use agm-marker everything is ok.

What do you think about update onChangesOverride like bellow?

   onChangesOverride( changes ){
    if( (changes.latitude || changes.longitude  || changes. zIndex) ){
      this.overlayView.latitude = this.latitude;
      this.overlayView.longitude = this.longitude;
      this.overlayView.zIndex = this.zIndex;

      this._markerManager.deleteMarker(<any>this.overlayView)
      .then(()=>this.load())
    }
  }

@AckerApple
Copy link
Owner

OHHHH OK, now I get it. Details help.

Issue a pull request and I’ll merge that code in

@AckerApple AckerApple added enhancement New feature or request good first issue Good for newcomers labels Aug 29, 2018
@AckerApple
Copy link
Owner

I have to run the build process and publish now

@AckerApple
Copy link
Owner

Get version 1.2.0

I updated all dependencies including Angular

Close this issue when satisfied

@Merglodov
Copy link
Author

Many thanks!

@Merglodov
Copy link
Author

Merglodov commented Sep 4, 2018

Hi @AckerApple !

Sorry for interrupting, but it looks like that code I have added has broken changes for InfoWindow.

When z-index changes event occurs related marker delete and as result Info Window hidden.

Perhaps it's better to cancel the changes until the right solution is ready?

I'm really sorry about the incorrect solution I have added.

@AckerApple
Copy link
Owner

Understood. I don’t have time to investigate right now. I also don’t like the info-window and don’t use it. Nor do I change zIndex in my markers.

So either you can issue a fix, wait for someone else to complain, or wait till it effect me and I will change

@AckerApple AckerApple reopened this Sep 4, 2018
@AckerApple
Copy link
Owner

Repopened until we figure what to do

@AckerApple AckerApple added help wanted Extra attention is needed and removed Ready to Close labels Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants