Rev 1281 | Rev 1283 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1281 | Rev 1282 | ||
|---|---|---|---|
| Line 41... | Line 41... | ||
| 41 | this.myLastGesture = null; |
41 | this.myLastGesture = null; |
| 42 | if (gestureStore) |
42 | if (gestureStore) |
| 43 | { |
43 | { |
| 44 | for (var n = 0; n < gestureStore['gestures'].length; n++) |
44 | for (var n = 0; n < gestureStore['gestures'].length; n++) |
| 45 | { |
45 | { |
| - | 46 | log(this.myName + ":" + this.myId + "> Checking : " + gestureStore['gestures'][n]['name'] + "\n"); |
|
| - | 47 | this.myLastGesture = null; |
|
| 46 | var result = 1; |
48 | var result = 1; |
| 47 | if ( |
49 | if (gestureStore['gestures'][n]['masks']['f1_lower'] > f1 || gestureStore['gestures'][n]['masks']['f1_upper'] < f1) |
| 48 | { |
- | |
| 49 | result = 0; |
- | |
| 50 | continue; |
- | |
| 51 | } |
- | |
| 52 | if (remotesStore['gestures'][n]['masks']['f2'] == 1 && remotesStore['gestures'][n]['functions']['f2'] != f2) |
- | |
| 53 | { |
- | |
| 54 | result = 0; |
- | |
| 55 | continue; |
- | |
| 56 | } |
- | |
| 57 | if (remotesStore['gestures'][n]['masks']['f3'] == 1 && remotesStore['gestures'][n]['functions']['f3'] != f3) |
- | |
| 58 | { |
- | |
| 59 | result = 0; |
- | |
| 60 | continue; |
- | |
| 61 | } |
- | |
| 62 | if (remotesStore['gestures'][n]['masks']['f4'] == 1 && remotesStore['gestures'][n]['functions']['f4'] != f4) |
- | |
| 63 | { |
- | |
| 64 | result = 0; |
- | |
| 65 | continue; |
- | |
| 66 | } |
- | |
| 67 | if (remotesStore['gestures'][n]['masks']['f5'] == 1 && remotesStore['gestures'][n]['functions']['f5'] != f5) |
- | |
| 68 | { |
- | |
| 69 | result = 0; |
- | |
| 70 | continue; |
- | |
| 71 | } |
- | |
| 72 | if (remotesStore['gestures'][n]['masks']['f6'] == 1 && remotesStore['gestures'][n]['functions']['f6'] != f6) |
- | |
| 73 | { |
50 | { |
| - | 51 | log("1"); |
|
| 74 | result = 0; |
52 | result = 0; |
| 75 | continue; |
53 | continue; |
| 76 | } |
54 | } |
| 77 | if (remotesStore['gestures'][n]['masks']['f7_lower'] <= f7 && remotesStore['gestures'][n]['masks']['f7_upper'] >= f7) |
- | |
| 78 | { |
- | |
| 79 | result = 0; |
- | |
| 80 | continue; |
- | |
| 81 | } |
- | |
| 82 | if ( |
55 | if (gestureStore['gestures'][n]['masks']['f2'] == 1 && gestureStore['gestures'][n]['functions']['f2'] != f2) |
| 83 | { |
- | |
| 84 | result = 0; |
- | |
| 85 | continue; |
- | |
| 86 | } |
- | |
| 87 | if (remotesStore['gestures'][n]['masks']['f9'] == 1 && remotesStore['gestures'][n]['functions']['f9'] != f9) |
- | |
| 88 | { |
56 | { |
| - | 57 | log("2"); |
|
| - | 58 | result = 0; |
|
| - | 59 | continue; |
|
| - | 60 | } |
|
| - | 61 | if (gestureStore['gestures'][n]['masks']['f3'] == 1 && gestureStore['gestures'][n]['functions']['f3'] != f3) |
|
| - | 62 | { |
|
| - | 63 | log("3"); |
|
| - | 64 | result = 0; |
|
| - | 65 | continue; |
|
| - | 66 | } |
|
| - | 67 | if (gestureStore['gestures'][n]['masks']['f4'] == 1 && gestureStore['gestures'][n]['functions']['f4'] != f4) |
|
| - | 68 | { |
|
| - | 69 | log("4"); |
|
| - | 70 | result = 0; |
|
| - | 71 | continue; |
|
| - | 72 | } |
|
| - | 73 | if (gestureStore['gestures'][n]['masks']['f5'] == 1 && gestureStore['gestures'][n]['functions']['f5'] != f5) |
|
| - | 74 | { |
|
| - | 75 | log("5"); |
|
| - | 76 | result = 0; |
|
| - | 77 | continue; |
|
| - | 78 | } |
|
| - | 79 | if (gestureStore['gestures'][n]['masks']['f6'] == 1 && gestureStore['gestures'][n]['functions']['f6'] != f6) |
|
| - | 80 | { |
|
| - | 81 | log("6"); |
|
| - | 82 | result = 0; |
|
| - | 83 | continue; |
|
| - | 84 | } |
|
| - | 85 | if (gestureStore['gestures'][n]['masks']['f7_lower'] > f7 || gestureStore['gestures'][n]['masks']['f7_upper'] < f7) |
|
| - | 86 | { |
|
| - | 87 | log("7"); |
|
| - | 88 | result = 0; |
|
| - | 89 | continue; |
|
| - | 90 | } |
|
| - | 91 | if (gestureStore['gestures'][n]['masks']['f8'] == 1 && gestureStore['gestures'][n]['functions']['f8'] != f8) |
|
| - | 92 | { |
|
| - | 93 | log("8"); |
|
| - | 94 | result = 0; |
|
| - | 95 | continue; |
|
| - | 96 | } |
|
| - | 97 | if (gestureStore['gestures'][n]['masks']['f9'] == 1 && gestureStore['gestures'][n]['functions']['f9'] != f9) |
|
| - | 98 | { |
|
| - | 99 | log("9"); |
|
| 89 | result = 0; |
100 | result = 0; |
| 90 | continue; |
101 | continue; |
| 91 | } |
102 | } |
| 92 | if (result == 1) { |
103 | if (result == 1) { |
| 93 | this.myLastGesture = |
104 | this.myLastGesture = gestureStore['gestures'][n]['name']; |
| - | 105 | return; |
|
| 94 | } |
106 | } |
| 95 | } |
107 | } |
| 96 | } |
108 | } |
| 97 | this.myLastGesture = null; |
- | |
| - | 109 | ||
| 98 | } |
110 | } |
| 99 | 111 | ||
| 100 | 112 | ||
| 101 | Touch.prototype.getLastGesture = function() |
113 | Touch.prototype.getLastGesture = function() |
| 102 | { |
114 | { |