NgDocImageViewerComponent
Wraps an image of the page: clicking it, or pressing Enter or Space on it, opens the image at its natural size, scaled down to fit the window.
An image inside a link keeps the link's behaviour, and an image with an empty alt is decorative: neither becomes a button.
- Decorators
@Component - Selectors
ng-doc-image-viewer
@Component ({ … })
export class NgDocImageViewerComponent { … }Members
Constructor1 | |||||||
() | — | ||||||
Signature | |||||||
Properties9 | |||||||
alt: | Alternative text of the image. | ||||||
element: HTMLElement | — | ||||||
image: | — | ||||||
opened: | Whether the scaled image is open. | ||||||
overlay: | — | ||||||
overlayRef?: | — | ||||||
size: | The size of the opened image. | ||||||
src: | Source of the image. | ||||||
window: Window | null | — | ||||||
Methods3 | |||||||
(): void | Opens the image at its natural size, scaled down to fit the window, unless the image is not interactive. The image grows from its place on the page. | ||||||
Signature Returns void | |||||||
(): boolean | Whether the image opens: it has a text alternative and is not inside a link. The page processor moves the host into place before change detection, so the check reads the DOM where the image ends up. | ||||||
Signature Returns boolean | |||||||
(…): void | Opens the image on Space without scrolling the page. | ||||||
Signature Parameters
Returns void | |||||||