diff options
author | Jose Antonio Marquez | 2012-02-02 18:00:45 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-02-02 18:00:45 -0800 |
commit | 04d89daed90c35a4393773ca2e2d0ac3a4c15cd4 (patch) | |
tree | d0041abc7379ef38b20cce148e5dea6f531b8569 /node_modules/montage/ui/bluemoon/slider.reel/slider.js | |
parent | 4d8306b638c53899403a4f0328c02bf1ab893e8f (diff) | |
parent | c630ead20487c3948fa36448d3e7d5f7b5cba782 (diff) | |
download | ninja-04d89daed90c35a4393773ca2e2d0ac3a4c15cd4.tar.gz |
Merge branch 'refs/heads/NinjaInternal' into FileIO
Conflicts:
.gitignore
js/ninja.reel/ninja.js
Diffstat (limited to 'node_modules/montage/ui/bluemoon/slider.reel/slider.js')
-rw-r--r-- | node_modules/montage/ui/bluemoon/slider.reel/slider.js | 583 |
1 files changed, 583 insertions, 0 deletions
diff --git a/node_modules/montage/ui/bluemoon/slider.reel/slider.js b/node_modules/montage/ui/bluemoon/slider.reel/slider.js new file mode 100644 index 00000000..56c4faa8 --- /dev/null +++ b/node_modules/montage/ui/bluemoon/slider.reel/slider.js | |||
@@ -0,0 +1,583 @@ | |||
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/bluemoon/slider.reel" | ||
8 | @requires montage/core/core | ||
9 | @requires montage/ui/component | ||
10 | */ | ||
11 | var Montage = require("montage").Montage, | ||
12 | Component = require("ui/component").Component, | ||
13 | dom = require("ui/dom"), | ||
14 | Point = require("core/geometry/point").Point; | ||
15 | |||
16 | /** | ||
17 | @class module:"montage/ui/bluemoon/slider.reel".Slider | ||
18 | @extends module:montage/ui/component.Component | ||
19 | */ | ||
20 | exports.Slider = Montage.create(Component,/** @lends module:"montage/ui/bluemoon/slider.reel".Slider# */ { | ||
21 | // Extra elements for rendering | ||
22 | /** | ||
23 | Description TODO | ||
24 | @private | ||
25 | */ | ||
26 | _bghl: { | ||
27 | enumerable: false, | ||
28 | value: null | ||
29 | }, | ||
30 | /** | ||
31 | Description TODO | ||
32 | @private | ||
33 | */ | ||
34 | _handlerbg: { | ||
35 | enumerable: false, | ||
36 | value: null | ||
37 | }, | ||
38 | /** | ||
39 | Description TODO | ||
40 | @private | ||
41 | */ | ||
42 | _bg: { | ||
43 | enumerable: false, | ||
44 | value: null | ||
45 | }, | ||
46 | /** | ||
47 | Description TODO | ||
48 | @private | ||
49 | */ | ||
50 | _handler: { | ||
51 | enumerable: false, | ||
52 | value: null | ||
53 | }, | ||
54 | /** | ||
55 | Description TODO | ||
56 | @private | ||
57 | */ | ||
58 | _line: { | ||
59 | enumerable: false, | ||
60 | value: null | ||
61 | }, | ||
62 | /** | ||
63 | Description TODO | ||
64 | @private | ||
65 | */ | ||
66 | _scale: { | ||
67 | enumerable: false, | ||
68 | value: null | ||
69 | }, | ||
70 | /** | ||
71 | Description TODO | ||
72 | @private | ||
73 | */ | ||
74 | _line2: { | ||
75 | enumerable: false, | ||
76 | value: null | ||
77 | }, | ||
78 | /** | ||
79 | Description TODO | ||
80 | @private | ||
81 | */ | ||
82 | _handler2: { | ||
83 | enumerable: false, | ||
84 | value: null | ||
85 | }, | ||
86 | /** | ||
87 | Description TODO | ||
88 | @private | ||
89 | */ | ||
90 | _handler3: { | ||
91 | enumerable: false, | ||
92 | value: null | ||
93 | }, | ||
94 | /** | ||
95 | Description TODO | ||
96 | @private | ||
97 | */ | ||
98 | _handler4: { | ||
99 | enumerable: false, | ||
100 | value: null | ||
101 | }, | ||
102 | /** | ||
103 | Description TODO | ||
104 | @private | ||
105 | */ | ||
106 | _handlerDragArea: { | ||
107 | enumerable: false, | ||
108 | value: null | ||
109 | }, | ||
110 | // Slider properties | ||
111 | /** | ||
112 | Description TODO | ||
113 | @private | ||
114 | */ | ||
115 | _isDragging: { | ||
116 | enumerable: true, | ||
117 | value: null | ||
118 | }, | ||
119 | /** | ||
120 | Description TODO | ||
121 | @private | ||
122 | */ | ||
123 | _cursorPosition: { | ||
124 | enumerable: false, | ||
125 | value: null | ||
126 | }, | ||
127 | /** | ||
128 | Description TODO | ||
129 | @private | ||
130 | */ | ||
131 | _width: { | ||
132 | enumerable: false, | ||
133 | value: 0 | ||
134 | }, | ||
135 | /** | ||
136 | Description TODO | ||
137 | @private | ||
138 | */ | ||
139 | _minValue: { | ||
140 | enumerable: false, | ||
141 | value: 0 | ||
142 | }, | ||
143 | /** | ||
144 | Description TODO | ||
145 | @private | ||
146 | */ | ||
147 | _hasTapBarToScroll: { | ||
148 | enumerable: false, | ||
149 | value: false | ||
150 | }, | ||
151 | /** | ||
152 | Description TODO | ||
153 | @type {Function} | ||
154 | @default {Boolean} false | ||
155 | */ | ||
156 | hasTapBarToScroll: { | ||
157 | get: function () { | ||
158 | return this._hasTapBarToScroll; | ||
159 | }, | ||
160 | set: function (value) { | ||
161 | this._hasTapBarToScroll = !!value; | ||
162 | } | ||
163 | }, | ||
164 | /** | ||
165 | Description TODO | ||
166 | @private | ||
167 | */ | ||
168 | _hasClickBarToScroll: { | ||
169 | enumerable: false, | ||
170 | value: true | ||
171 | }, | ||
172 | /** | ||
173 | Description TODO | ||
174 | @type {Function} | ||
175 | @default {Boolean} true | ||
176 | */ | ||
177 | hasClickBarToScroll: { | ||
178 | get: function () { | ||
179 | return this._hasClickBarToScroll; | ||
180 | }, | ||
181 | set: function (value) { | ||
182 | this._hasClickBarToScroll = !!value; | ||
183 | if (this._hasClickBarToScroll) { | ||
184 | this.element.addEventListener("mousedown", this, false); | ||
185 | } else { | ||
186 | this.element.removeEventListener("mousedown", this, false); | ||
187 | } | ||
188 | } | ||
189 | }, | ||
190 | /** | ||
191 | Description TODO | ||
192 | @type {Function} | ||
193 | @default {Number} 0 | ||
194 | */ | ||
195 | minValue: { | ||
196 | serializable: true, | ||
197 | get: function () { | ||
198 | return this._minValue; | ||
199 | }, | ||
200 | set: function (value) { | ||
201 | if (value !== this._minValue) { | ||
202 | this._minValue = value; | ||
203 | this._valueRange = null; | ||
204 | this.needsDraw = true; | ||
205 | } | ||
206 | } | ||
207 | }, | ||
208 | /** | ||
209 | Description TODO | ||
210 | @private | ||
211 | */ | ||
212 | _maxValue: { | ||
213 | enumerable: false, | ||
214 | value: 100 | ||
215 | }, | ||
216 | |||
217 | /** | ||
218 | Description TODO | ||
219 | @type {Function} | ||
220 | @default {Number} 100 | ||
221 | */ | ||