fa-image-surface

This directive creates a Famo.us ImageSurface and loads the specified ImageUrl.

Usage

<fa-image-surface fa-image-url="img/my-image.png">
</fa-image-surface>

API

Attr Type Details
faImageUrl String

String url pointing to the image that should be loaded into the Famo.us ImageSurface

Example

To use fa-image-surface, declare an fa-image-url attribute with a string url.

<fa-image-surface
           fa-image-url="img/my-image.png"
           class="img"
           fa-color="'blue'"
           fa-background-color="'#fff'"
           fa-size="[200, 300]">
</fa-image-surface>

Fa-image-surface accepts two css-style properties: color and background color, which may be assigned values by the fa-color and fa-background-color attributes respectively.

Fa-size may also be declared as an attribute. If void, the fa-image-surface will inherit the size of its parent node.