diff options
author | Valerio Virgillito | 2012-02-03 12:20:10 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-03 12:20:10 -0800 |
commit | e6e539f345f5e1ac36a595db5d1a1c3700715e88 (patch) | |
tree | 39846bf1570f9b5a4057b726c54905de9e9e1c02 /node_modules/montage/ui/image.reel/image.js | |
parent | 7950424cf704bb221971f4645406b01e6979db18 (diff) | |
parent | c630ead20487c3948fa36448d3e7d5f7b5cba782 (diff) | |
download | ninja-e6e539f345f5e1ac36a595db5d1a1c3700715e88.tar.gz |
Merge branch 'master' into components
Conflicts:
node_modules/montage/ui/bluemoon/progress.reel/progress.html
node_modules/montage/ui/image2.reel/image2.html
node_modules/ninja-components/effect/desaturate-effect.js
node_modules/ninja-components/effect/effect.js
node_modules/ninja-components/effect/invert-effect.js
node_modules/ninja-components/effect/kaliedoscope-effect.js
node_modules/ninja-components/effect/multiply-effect.js
node_modules/ninja-components/effect/sepia-effect.js
node_modules/ninja-components/flow-controller.reel/flow-controller.html
node_modules/ninja-components/flow-controller.reel/flow-controller.js
node_modules/ninja-components/flow-offset.js
node_modules/ninja-components/hottext.reel/hottext.css
node_modules/ninja-components/hottext.reel/hottext.html
node_modules/ninja-components/hottext.reel/hottext.js
node_modules/ninja-components/hottextunit.reel/hottextunit.css
node_modules/ninja-components/hottextunit.reel/hottextunit.html
node_modules/ninja-components/hottextunit.reel/hottextunit.js
node_modules/ninja-components/image2.reel/image2.html
node_modules/ninja-components/image2.reel/image2.js
node_modules/ninja-components/image3d.reel/image3d.html
node_modules/ninja-components/image3d.reel/image3d.js
node_modules/ninja-components/photo-editor.reel/photo-editor.css
node_modules/ninja-components/photo-editor.reel/photo-editor.html
node_modules/ninja-components/photo-editor.reel/photo-editor.js
node_modules/ninja-components/slider-base.js
user-document-templates/montage-application-cloud/appdelegate.js
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/image.reel/image.js')
-rwxr-xr-x[-rw-r--r--] | node_modules/montage/ui/image.reel/image.js | 65 |
1 files changed, 11 insertions, 54 deletions
diff --git a/node_modules/montage/ui/image.reel/image.js b/node_modules/montage/ui/image.reel/image.js index 457d43d3..5deebbf6 100644..100755 --- a/node_modules/montage/ui/image.reel/image.js +++ b/node_modules/montage/ui/image.reel/image.js | |||
@@ -3,63 +3,20 @@ | |||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<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. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | /** | ||
7 | @module "montage/ui/image.reel" | ||
8 | @requires montage/core/core | ||
9 | @requires montage/ui/component | ||
10 | */ | ||
11 | var Montage = require("montage").Montage, | 6 | var Montage = require("montage").Montage, |
12 | Component = require("ui/component").Component; | 7 | Component = require("ui/component").Component, |
8 | NativeControl = require("ui/native-control").NativeControl; | ||
9 | |||
13 | /** | 10 | /** |
14 | @class module:"montage/ui/image.reel".Image | 11 | * The <img> native control with binding support for the standard attributes |
15 | @extends module:montage/ui/component.Component | ||
16 | */ | 12 | */ |
17 | exports.Image = Montage.create(Component, /** @lends module:"montage/ui/image.reel".Image# */ { | 13 | var Image = exports.Image = Montage.create(NativeControl, { |
18 | 14 | ||
19 | hasTemplate: { | 15 | }); |
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 | 16 | ||
17 | Image.addAttributes({ | ||
18 | alt: null, | ||
19 | height: null, | ||
20 | src: null, | ||
21 | width: null | ||
65 | }); | 22 | }); |