aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/image.reel
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /node_modules/montage/ui/image.reel
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/image.reel')
-rw-r--r--node_modules/montage/ui/image.reel/image.js65
1 files changed, 65 insertions, 0 deletions
diff --git a/node_modules/montage/ui/image.reel/image.js b/node_modules/montage/ui/image.reel/image.js
new file mode 100644
index 00000000..457d43d3
--- /dev/null
+++ b/node_modules/montage/ui/image.reel/image.js
@@ -0,0 +1,65 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6/**
7 @module "montage/ui/image.reel"
8 @requires montage/core/core
9 @requires montage/ui/component
10*/
11var Montage = require("montage").Montage,
12 Component = require("ui/component").Component;
13/**
14 @class module:"montage/ui/image.reel".Image
15 @extends module:montage/ui/component.Component
16 */
17exports.Image = Montage.create(Component, /** @lends module:"montage/ui/image.reel".Image# */ {
18
19 hasTemplate: {
20 enumerable: false,
21 value: false
22 },
23/**
24 Description TODO
25 @private
26*/
27 _src: {
28 enumerable: false,
29 value: null
30 },
31/**
32 Description TODO
33 @type {Function}
34 @default null
35 */
36 src: {
37 get: function() {
38 return this._src;
39 },
40 set: function(value) {
41 if (this._src !== value) {
42 this.needsDraw = true;
43 }
44 this._src = value;
45 }
46 },
47/**
48 Description TODO
49 @type {Property}
50 @default {String} ""
51 */
52 defaultSrc: {
53 value: ""
54 },
55/**
56 Description TODO
57 @function
58 */
59 draw: {
60 value: function() {
61 this.element.src = this._src != null ? this._src : this.defaultSrc;
62 }
63 }
64
65});