documentation update, some api docs, overview and tutorial upto first DM and IM inclu...
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Image.pm
CommitLineData
6c3805b0 1package Reaction::UI::Widget::Image;
2
3use Reaction::UI::WidgetClass;
4use namespace::clean -except => [ qw(meta) ];
5
6before fragment widget {
7 my $vp = $_{viewport};
8 my $attrs = {
2aa8d0f2 9 src => $vp->uri,
6c3805b0 10 ($vp->has_width ? (width => $vp->width) : ()),
11 ($vp->has_height ? (height => $vp->height) : ()),
12 };
13 arg img_attrs => attrs( $attrs );
14};
15
16__PACKAGE__->meta->make_immutable;
17
181;
19
20__END__;