Home

# Class goog.ui.media.Photo

Subclasses a goog.ui.media.MediaRenderer to provide a Photo specific media renderer. Provides a base class for any other renderer that wants to display photos. This class is meant to be used as a singleton static stateless class, that takes {@code goog.ui.media.Media} instances and renders it. This design is patterned after http://go/closure_control_subclassing

extends goog.ui.media.MediaRenderer

Instance Method Summary
| `createDom(?goog.ui.media.Media control) ⇒ ?Element` Creates the initial DOM structure of a photo.
| `getCssClass() ⇒ string` Returns the CSS class to be applied to the root element of components rendered using this renderer.

Static Method Summary

`newControl(?goog.ui.media.MediaModel dataModel) ⇒ ?goog.ui.media.Media`

A static convenient method to construct a goog.ui.media.Media control out of a photo {@code goog.ui.media.MediaModel}. It sets it as the data model goog.ui.media.Photo renderer uses, sets the states supported by the renderer, and returns a Control that binds everything together. This is what you should be using for constructing Photos, except if you need finer control over the configuration.