diff options
author | Jonathan Duran | 2012-03-09 13:51:58 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-03-09 13:51:58 -0800 |
commit | 24ce6216cf83a90dd7ba7b8761932aead49bd9e7 (patch) | |
tree | e912062cbe8a3a86045c4ce05a33b083455cc4c9 /node_modules/montage/ui/skeleton/range-input.reel/range-input.js | |
parent | a7aaa0f0c492157e481c1c5711d1ecbcf9445bb2 (diff) | |
download | ninja-24ce6216cf83a90dd7ba7b8761932aead49bd9e7.tar.gz |
Squashed commit of the following:
commit b4eb2f6cc1208fe5c18aa1f02a85adda25075d81
Merge: dac3dcd 3a9c7a5
Author: Valerio Virgillito <valerio@motorola.com>
Date: Fri Mar 9 10:46:29 2012 -0800
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
commit 3a9c7a57a227a36ec47c6635fc6a0bd4c4b7f9c3
Merge: 5940b22 caa0825
Author: Valerio Virgillito <valerio@motorola.com>
Date: Thu Mar 8 15:51:58 2012 -0800
Merge pull request #102 from dhg637/Panels
Fixed Some Calculation issues and bugs & appended disabled state when no documents exist
commit dac3dcdc74e60a1948a6d8d994fa7ef38a446b7c
Merge: 22a66cb 5940b22
Author: Valerio Virgillito <valerio@motorola.com>
Date: Thu Mar 8 13:57:28 2012 -0800
Merge branch 'refs/heads/master' into montage-integration
commit 22a66cb6e243a3f1c867b62e3942fd2e828019d9
Author: Valerio Virgillito <valerio@motorola.com>
Date: Thu Mar 8 13:56:09 2012 -0800
integrating v0.7 montage into ninja
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
commit 5940b22e01de4fc36e5c5de5f3ed074f08fadb07
Merge: 9b006ac 130cd6d
Author: Valerio Virgillito <valerio@motorola.com>
Date: Thu Mar 8 13:39:11 2012 -0800
Merge pull request #104 from ananyasen/integration-candidate
IKNINJA-1270: fixed browser crashing when you close a document while playing a video
commit 130cd6d4b99c9db344ec0ab44a54a59d11b31d2f
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Thu Mar 8 13:29:58 2012 -0800
IKNINJA-1270: fixed browser crashing when you close a document while playing a video
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit caa08250663007bea76faf555f166b42cf4c76fb
Author: Armen Kesablyan <armen@motorola.com>
Date: Thu Mar 8 12:09:13 2012 -0800
Disabled State is now darker
Signed-off-by: Armen Kesablyan <armen@motorola.com>
commit 21cb7af351e738f446458af5b896c84e03fa5c17
Author: Armen Kesablyan <armen@motorola.com>
Date: Thu Mar 8 12:05:43 2012 -0800
Z-Index issue of disabled state with file open dialog
Signed-off-by: Armen Kesablyan <armen@motorola.com>
commit 9b006acf1f6c2be5abc54f94a8bee7e684f106f9
Merge: 0637a6d 1c61c69
Author: Valerio Virgillito <valerio@motorola.com>
Date: Thu Mar 8 11:04:02 2012 -0800
Merge pull request #100 from imix23ways/TimelineUber
Timeline uber
commit 0637a6d9cc9fbe074145ad6beaa4725f5e7eb212
Merge: cef0708 d981394
Author: Valerio Virgillito <valerio@motorola.com>
Date: Wed Mar 7 19:32:38 2012 -0800
Merge pull request #103 from joseeight/FileIO-Build-Candidate
File I/O Fixed
commit d9813946dc28d8c28033a68b68300b9d9eda115c
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Mar 7 19:22:05 2012 -0800
Image data fix on Open
Fixed a bug with data-uris not opening correctly.
commit 8b0988b6dd2fe7f5977f70f651f7155c78ee872b
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Mar 7 19:04:19 2012 -0800
Adding To-do comments for CDN stylesheets
Removed inserting CDN styles into head as it was proper because the hierarchy would be lost, and there is no current fast-alternative to achieve a preview.
commit bb83bfb7af1e82dfbce7661fe2eb7612ff730c6f
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Wed Mar 7 18:36:31 2012 -0800
Removing temp viewing of CDN styles
It's not done correctly, we really need the proxy for this.
commit 84931583f1da8da29784074978f146b281b8efa3
Author: Armen Kesablyan <armen@motorola.com>
Date: Wed Mar 7 16:08:36 2012 -0800
Disabled state for panels
Signed-off-by: Armen Kesablyan <armen@motorola.com>
commit d18d91946627c53c646a6f167855551a1891f8f4
Author: Armen Kesablyan <armen@motorola.com>
Date: Wed Mar 7 14:33:09 2012 -0800
Reordering and resizing now works
Signed-off-by: Armen Kesablyan <armen@motorola.com>
commit e3a5626b21ac8b906638bed9eb96aca5fadd26d8
Author: Armen Kesablyan <armen@motorola.com>
Date: Wed Mar 7 11:41:10 2012 -0800
Fixed: Collapsed panels would collapse panels below
Signed-off-by: Armen Kesablyan <armen@motorola.com>
commit c7b07a9663ac1553fb10d8541b25274e522e07f7
Author: Armen Kesablyan <armen@motorola.com>
Date: Wed Mar 7 10:39:23 2012 -0800
Fixed Collapsing and resizing window with panels
Signed-off-by: Armen Kesablyan <armen@motorola.com>
commit cef07085443b7c31e878daaad083b7408c57e104
Merge: 2e3943a fca9290
Author: Valerio Virgillito <valerio@motorola.com>
Date: Tue Mar 6 17:08:28 2012 -0800
Merge pull request #99 from joseeight/FileIO-Build-Candidate
File IO Updates
commit fca92904597895675ddd216399cd235f3c5a7cfa
Merge: ec7cbc9 eebb7de
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 17:02:44 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit eebb7de4d19cddec9c763a073d8cf41d76fe70f7
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 17:02:37 2012 -0800
Adding CDN support for URLs in linked CSS
commit f6a60f50ca9cd09713baa27f2990eda9346496fc
Merge: 7271c25 2e3943a
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 16:19:59 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Conflicts:
js/controllers/selection-controller.js
commit 7271c25bf34917b1751f433d284f21485057425b
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 11:24:25 2012 -0800
Fixing WebGL not available bug
commit 3c4967fa93b3abc529fc404115707307ba72d5cd
Merge: bee2df0 84332ab
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 11:18:30 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO
commit ec7cbc95de031d2be667c2a8629a9d63e91f7e1a
Merge: 97176d4 bee2df0
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 11:05:04 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit bee2df0d4da72677aaa2adae669ffdd4ac210dd6
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Tue Mar 6 11:04:52 2012 -0800
Changing length of characters per line (pretty function)
commit 97176d466bb0d217f1bc5f45e362ed15c3066507
Merge: de26ba9 887e555
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 23:35:08 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit 887e555d00939a99fd13d0fc8fe081a4feb5d677
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 23:34:54 2012 -0800
CSS on CDN preview fix
commit de26ba991c1d6351dfed4a81c246f62d40f075d6
Merge: 478c50e 4f274aa
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 23:19:08 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit 4f274aa5beff735f63905704e52e6ea938c140d9
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 23:18:49 2012 -0800
Temp support for CDN CSS
Added a temp fix for allow the viewing of CSS on a CDN, however, the styles should not be editable, but will allow for accurate preview of styles. Need to coordinate with the CSS panel and styles manager to insert styles in the appropriate files or tags that have write permission.
commit 478c50ee0ce0291c13c4f1e469a234b64946413e
Merge: 869f5f1 a68fe3f
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 22:24:20 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit a68fe3f0180f5ab3304ff201be8da40c4432bd40
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 22:23:59 2012 -0800
Minor Fix
Forgot to comment out the return, therefore preventing to save.
commit 869f5f1ca66b976ba07049b1180882cb8ccb9630
Merge: 0913cd5 4c4d49a
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 20:07:10 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit 4c4d49ae7958e2c87764f9319665189cf69c5c0a
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 20:06:32 2012 -0800
Fixed URL parsing issue on actual opened document
Still need to implement CSS loaded from a CDN, currently this would break Ninja.
commit 0913cd53a13083119a6e6bfc2ee939e6becd40e0
Merge: 4505203 56efed8
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 16:16:34 2012 -0800
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
commit 56efed8b1ed9974aade615fce2d96bc214d21540
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Mon Mar 5 15:55:30 2012 -0800
Resolved URL path issues in document and CSS
Added logic to allow for files opened and assets linked in any order all under the cloud server root.
commit 195624da6d0c5d15bcde8a8655355544687ef58a
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Sun Mar 4 19:21:34 2012 -0800
Setting up document level URL parsing
Set up logic to parse URLs document level (href, src, url) still need to add functionality to return proper value, currently only detecting current value.
commit b2de52888a7c976cc9ae40518e3653cec0aac296
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Sun Mar 4 11:15:27 2012 -0800
Improved CSS URL cleaned
Added logic to accommodate any URLs in a CSS file inside the opened document root. Need to add logic for handling linked references above the root. Also need to reformat into a reusable method as it might be needed besides CSS.
commit 5c49635cc44815364f9a0296ffaa7acc34254937
Merge: 5c97959 13f52cf
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 19:06:37 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO
commit 45052033e018ecc0cba582f84c0431d3bd4020fe
Merge: 940b9fc 13f52cf
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 19:06:17 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO-Build-Candidate
commit 940b9fc0bf71845bcae39de637e85697e5911eea
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 15:54:12 2012 -0800
Formatting fixes
commit 5c9795958b08c233eb2c4afab8054d55c3a33d98
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 14:52:18 2012 -0800
Minor logic fixes for URL resolution in CSS
commit 4d35a90ba032d51ce701eebec323117d02e827fa
Merge: e24631e 0aeb400
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 14:20:46 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO
commit e24631ecac0772fc51756fe4aff9638de3b95faf
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 14:11:08 2012 -0800
Fixing CSS URL issues
Only partially, supporting unquoted files under same root.
commit c4bfc8b79820b55cc86d755fe590ee649813232a
Merge: ff77f86 ff0a956
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 10:34:57 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO
commit ff77f861fba349dd36d6c15c9a545459c3a76583
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Fri Mar 2 10:34:01 2012 -0800
Fixing IO RegEx
Fixed parsing files to have correct URLs with RegEx, inner content of CSS files still needs to be fixed.
commit 66bc1f46938afc696b11878ebbb97d1fd361386e
Merge: 80ac930 61dd921
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Thu Mar 1 18:13:18 2012 -0800
Merge branch 'refs/heads/Ninja-Internal' into FileIO
commit 80ac930684255dd24cecae70b488285a6058488e
Author: Jose Antonio Marquez <kgq387@motorola.com>
Date: Thu Mar 1 13:34:45 2012 -0800
Optimizing URL intercepting detection
Modified the way the webRequest maps to the file.
commit 13aca03d4e0d11729d691db0b7f0d2f2a6899cf6
Merge: b09956e 8fee7d6
Author: Jose Antonio Marquez Russo <jose@eightyearproject.com>
Date: Wed Feb 29 15:41:12 2012 -0800
Merge pull request #24 from ananyasen/FileIO
undo/redo per document , codemirror 2.22 update
commit 8fee7d6bdb55ba18f396c3523081b18499fa1e30
Merge: 5d4f1aa b09956e
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Wed Feb 29 15:21:31 2012 -0800
Merge branch 'refs/heads/ninja-internal-master' into FileIO
Conflicts:
js/controllers/selection-controller.js
js/document/html-document.js
js/panels/properties/content.reel/content.js
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 5d4f1aad01737695238582c704e6d4f2c3a2f317
Merge: ccedeef 551e1f2
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Wed Feb 29 14:53:13 2012 -0800
Merge branch 'refs/heads/ninja-internal-master' into FileIO
commit ccedeef38d6eb2e55d1782b82401828f3c99dd9c
Merge: 7a259f8 84d6f6f
Author: Ananya Sen <xhdq84@motorola.com>
Date: Wed Feb 29 13:56:35 2012 -0800
Merge pull request #4 from mqg734/AnanyaFileIO
Fix for selection bug due to bad scrollLeft and scrollTop values when switching between documents.
commit 84d6f6f5518e5ef8fc3d68be7e41c510f57b597a
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Wed Feb 29 13:53:45 2012 -0800
Fixing typo.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit 0cd17b6cf9231e60083958d85759d4796f505342
Author: Nivesh Rajbhandari <mqg734@motorola.com>
Date: Wed Feb 29 13:48:11 2012 -0800
Fix for selection bug due to bad scrollLeft and scrollTop values when switching between documents.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
commit 7a259f8c78a2394e32c62654623285ee595c6249
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Wed Feb 29 13:25:35 2012 -0800
IKNINJA-1217: use encodeURI instead to save into sessionStorage
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 4e21db069b28c79236c8c7fd19dcc7810d28c5cb
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Wed Feb 29 12:18:09 2012 -0800
set selectionContainer before restoring selected elements
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 03ea76700cb8bee3f4f58acf3e3503b0642d13fb
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Wed Feb 29 11:46:19 2012 -0800
fixed selection which click after switching to a document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 7a9c2a91dfbbdd0cd7c79d81be5aeecd7887e7f1
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Wed Feb 29 10:12:38 2012 -0800
handle selections for switching documents
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 1c7e86b6c2c802d720cc3075f75c7a61866ebc07
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Tue Feb 28 16:41:18 2012 -0800
fix for creatingNewFile flag
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit e0fab951e4f3869b04fd4a01f429a6654991cd68
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Tue Feb 28 15:33:35 2012 -0800
minor fixes in saving undo/redo stacks per document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 1766c6b17e2311fcd21c2be6608c7dcdc0a9b23a
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Tue Feb 28 15:07:49 2012 -0800
persist selections while switching documents
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 866df4801b9e77a0155ffbfb87adbc79a94ce9a5
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Tue Feb 28 12:34:33 2012 -0800
reverted null check as per request
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit ada597016685a83f2c9a8b25b28589b9221569c0
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Tue Feb 28 12:26:52 2012 -0800
reverting null checks as per request
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit bca9189a076432f35f99fc90f271c45ec00c0f1c
Merge: 2edcdd8 6af71de
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Tue Feb 28 10:06:48 2012 -0800
Merge branch 'refs/heads/FileIO-jose' into FileIO
commit 2edcdd88ffc2f6ff0ea836e4da3e1fd2cb3e856f
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Mon Feb 27 17:39:26 2012 -0800
persist undo/redo stack per html document
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
commit 51ed781953bc44bba3c70938aa57b856394cbc88
Author: Ananya Sen <Ananya.Sen@motorola.com>
Date: Mon Feb 27 14:41:21 2012 -0800
updating to codemirror 2.22
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/skeleton/range-input.reel/range-input.js')
-rw-r--r-- | node_modules/montage/ui/skeleton/range-input.reel/range-input.js | 234 |
1 files changed, 234 insertions, 0 deletions
diff --git a/node_modules/montage/ui/skeleton/range-input.reel/range-input.js b/node_modules/montage/ui/skeleton/range-input.reel/range-input.js new file mode 100644 index 00000000..5747ccd6 --- /dev/null +++ b/node_modules/montage/ui/skeleton/range-input.reel/range-input.js | |||
@@ -0,0 +1,234 @@ | |||
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 | /*global require,exports */ | ||
7 | var Montage = require("montage").Montage, | ||
8 | Component = require("ui/component").Component; | ||
9 | |||
10 | /** | ||
11 | * The input type="range" field | ||
12 | */ | ||
13 | var RangeInput = exports.RangeInput = Montage.create(Component, { | ||
14 | |||
15 | DEFAULT_WIDTH: {value: 300}, | ||
16 | HANDLE_ADJUST: {value: 5}, | ||
17 | |||
18 | hasTemplate: {value: true}, | ||
19 | |||
20 | // public API | ||
21 | _min: {value: null}, | ||
22 | min: { | ||
23 | get: function() { | ||
24 | return this._min; | ||
25 | }, | ||
26 | set: function(value) { | ||
27 | this._min = String.isString(value) ? parseFloat(value) : value; | ||
28 | this.needsDraw = true; | ||
29 | } | ||
30 | }, | ||
31 | |||
32 | _max: {value: null}, | ||
33 | max: { | ||
34 | get: function() { | ||
35 | return this._max; | ||
36 | }, | ||
37 | set: function(value) { | ||
38 | this._max = String.isString(value) ? parseFloat(value) : value; | ||
39 | this.needsDraw = true; | ||
40 | } | ||
41 | }, | ||
42 | |||
43 | _step: {value: null}, | ||
44 | step: { | ||
45 | get: function() { | ||
46 | return this._step; | ||
47 | }, | ||
48 | set: function(value) { | ||
49 | this._step = String.isString(value) ? parseFloat(value) : value; | ||
50 | this.needsDraw = true; | ||
51 | } | ||
52 | }, | ||
53 | |||
54 | /** Width of the slider in px. Default = 300 */ | ||
55 | _width: {value: null}, | ||
56 | width: { | ||
57 | get: function() { | ||
58 | return this._width; | ||
59 | }, | ||
60 | set: function(value) { | ||
61 | this._width = String.isString(value) ? parseFloat(value) : value; | ||
62 | this.needsDraw = true; | ||
63 | } | ||
64 | }, | ||
65 | |||
66 | |||
67 | _sliding: {value: false}, | ||
68 | |||
69 | percent: {value: null}, | ||
70 | _valueSyncedWithPosition: {value: null}, | ||
71 | _value: {value: null}, | ||
72 | value: { | ||
73 | get: function() { | ||
74 | return this._value; | ||
75 | }, | ||
76 | set: function(value, fromInput) { | ||
77 | this._value = String.isString(value) ? parseFloat(value) : value; | ||
78 | |||
79 | if(fromInput) { | ||
80 | this._valueSyncedWithPosition = true; | ||
81 | } else { | ||
82 | this._valueSyncedWithPosition = false; | ||
83 | this._calculatePositionFromValue(); | ||
84 | this.needsDraw = true; | ||
85 | } | ||
86 | } | ||
87 | }, | ||
88 | |||
89 | // private | ||
90 | sliderEl: {value: null, enumerable: false}, | ||
91 | handleEl: {value: null, enumerable: false}, | ||
92 | sliderLeft: {value: null, enumerable: false}, | ||
93 | sliderWidth: {value: null, enumerable: false}, | ||
94 | minX: {value: null, enumerable: false}, | ||
95 | maxX: {value: null, enumerable: false}, | ||
96 | |||
97 | _positionX: {value: null}, | ||
98 | positionX: { | ||
99 | enumerable: false, | ||
100 | get: function() { | ||
101 | return this._positionX; | ||
102 | }, | ||
103 | set: function(value, fromValue) { | ||
104 | |||
105 | if(value !== null && !isNaN(value)) { | ||
106 | this._positionX = value; | ||
107 | if(!fromValue) { | ||
108 | this._calculateValueFromPosition(); | ||
109 | this._valueSyncedWithPosition = true; | ||
110 | } | ||
111 | this.needsDraw = true; | ||
112 | } | ||
113 | |||
114 | } | ||
115 | }, | ||
116 | |||
117 | _calculateValueFromPosition: { | ||
118 | value: function() { | ||
119 | if(this.sliderWidth > 0) { | ||
120 | var percent = this.percent = (this.positionX / this.sliderWidth) * 100; | ||
121 | var value = (this.min + ((percent/100) * (this.max - this.min))); | ||
122 | Object.getPropertyDescriptor(this, "value").set.call(this, value, true); | ||
123 | } | ||
124 | |||
125 | } | ||
126 | }, | ||
127 | |||
128 | _calculatePositionFromValue: { | ||
129 | value: function() { | ||
130 | // unless the element is ready, we cannot position the handle | ||
131 | if(this.sliderWidth) { | ||
132 | var percent, value = this.value; | ||
133 | var range = (this.max - this.min); | ||
134 | percent = ((this.value-this.min)/range) * 100; | ||
135 | var positionX = (percent/100)*this.sliderWidth; | ||
136 | Object.getPropertyDescriptor(this, "positionX").set.call(this, positionX, true); | ||
137 | this.percent = percent; | ||
138 | this._valueSyncedWithPosition = true; | ||
139 | } else { | ||
140 | this._valueSyncedWithPosition = false; | ||
141 | } | ||
142 | } | ||
143 | }, | ||
144 | |||
145 | deserializedFromTemplate: { | ||
146 | value: function() { | ||
147 |