aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage-google/picasa-carousel.reel/image.reel/image.js
blob: d5b9363e1e4e299d0cd1b60f459d9a7bc1e5bc2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var Montage = require("montage").Montage,
    Component = require("montage/ui/component").Component;

var Image = exports.Image = Montage.create(Component, {

    _src: {value: null},

    src: {
        set: function(value) {
            this._src = value;
            this.needsDraw = true;
        }
    },

    draw: {
        value: function() {
            this._element.style.backgroundImage = "url(" + this._src + ")";
        }
    }
});