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

Left arrow shown when first image clicked #2

Closed
bob-lee opened this issue Dec 29, 2016 · 1 comment
Closed

Left arrow shown when first image clicked #2

bob-lee opened this issue Dec 29, 2016 · 1 comment
Labels

Comments

@bob-lee
Copy link

bob-lee commented Dec 29, 2016

Nice work, found minor thing: when first image clicked, left arrow is shown wrongly as updateArrowActivation() is not being called. Suggest replace updateArrowActivation() with two getters like:

public get left(): boolean {
return this.currentIdx > 0;
}

public get right(): boolean {
return this.currentIdx < this.images.length - 1;
}

Then in template:

<img [ngClass]="{'activeArrow': left}" ... />
<img [ngClass]="{'activeArrow': right}" ... />

@BenjaminBrandmeier
Copy link
Owner

Thanks a lot @bob-lee!
Included your suggestion in the code, just with different method naming.

If you'd like to contribute more, I'm also happy to accept pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants