From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/image.reel/image.js | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 node_modules/montage/ui/image.reel/image.js (limited to 'node_modules/montage/ui/image.reel') 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 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ +/** + @module "montage/ui/image.reel" + @requires montage/core/core + @requires montage/ui/component +*/ +var Montage = require("montage").Montage, + Component = require("ui/component").Component; +/** + @class module:"montage/ui/image.reel".Image + @extends module:montage/ui/component.Component + */ +exports.Image = Montage.create(Component, /** @lends module:"montage/ui/image.reel".Image# */ { + + hasTemplate: { + enumerable: false, + value: false + }, +/** + Description TODO + @private +*/ + _src: { + enumerable: false, + value: null + }, +/** + Description TODO + @type {Function} + @default null + */ + src: { + get: function() { + return this._src; + }, + set: function(value) { + if (this._src !== value) { + this.needsDraw = true; + } + this._src = value; + } + }, +/** + Description TODO + @type {Property} + @default {String} "" + */ + defaultSrc: { + value: "" + }, +/** + Description TODO + @function + */ + draw: { + value: function() { + this.element.src = this._src != null ? this._src : this.defaultSrc; + } + } + +}); -- cgit v1.2.3