aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ninja-components/image3d.reel/image3d.js
blob: d9b7b302e1c2009c1c07c1e3de83b1a0ef08d689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* <copyright>
This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
(c) Copyright 2011 Motorola Mobility, Inc.  All Rights Reserved.
</copyright> */

var Montage = require("montage").Montage,
    Component = require("ui/component").Component;

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

    _data: {value: null},
    
    data: {
        set: function(value) {
            this._data = value;
            this.needsDraw = true;
        }
    },
    
    draw: {
        value: function() {
            this._element.style.background = "url(" + this._data["src"] + ")";
            this.left.textContent = this._data["text"];
            this.right.textContent = this._data["text"];            
            //this.left.style.background = "-webkit-gradient(linear, left top, left bottom, from(rgba(50,50,50,.7)), color-stop(10%, rgba(10,10,10,.5)), to(black)) left top no-repeat, url(" + this._src + ") left top no-repeat";
            //this.left.style.backgroundSize="10000% 10000%";
        }
    }
});