Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

motion section fleshed out -- still being lazy

  • Loading branch information...
commit ff7af9620c142807c0b404182a319e4fc1ec0eb3 1 parent 13e1366
Schuyler Duveen authored October 27, 2011

Showing 2 changed files with 38 additions and 16 deletions. Show diff stats Hide diff stats

  1. 3  composer.html
  2. 51  js/select.js
3  composer.html
@@ -194,6 +194,9 @@
194 194
                 <li data-role="fieldcontain">
195 195
                   <input id="motion-rotate" name="rotate" type="button" value="rotate" />
196 196
                 </li>
  197
+                <li id="motion-shift" data-role="fieldcontain">
  198
+                  <input id="motion-shift" name="shiftsymbol" type="button" value="different symbol" />        
  199
+                </li>
197 200
                 <!--li id="motion-dist" data-role="fieldcontain">
198 201
                   <fieldset id="motion-dist-fs" data-role="controlgroup" data-type="horizontal">
199 202
                     <legend>Distance</legend>
51  js/select.js
@@ -69,7 +69,9 @@ Composer.prototype = {
69 69
         if (shobj && m) {
70 70
             var section = m[1], 
71 71
                 field = this.name,
72  
-                val = ((this.checked === false) ? '' :$(this).val());
  72
+            //this.value for buttons
  73
+                val = ((this.type === 'checkbox' && this.checked === false) 
  74
+                       ? '' : $(this).val());
73 75
             if (field=='delete') {
74 76
                 return self.deleteGlyph();
75 77
             }
@@ -402,12 +404,19 @@ Composer.prototype = {
402 404
             ]
403 405
         },
404 406
         'motion':{
405  
-            'size':30, 'ranges':['21400','2f7ff'],
  407
+            'size':40, 'ranges':['21400','2f7ff'],
406 408
             "transforms":{
407  
-                'rotate':function(key,rot){return this.general_transforms['rotate'](key,rot);},
408  
-                'hand':function(key,hand){
  409
+                'rotate':function(key,rot) {
  410
+                    return this.general_transforms['rotate'](key,rot);
  411
+                },
  412
+                'hand':function(key,hand) {
409 413
                     var h = {'left':0,'right':1,'both':2};
410 414
                     return (key.substr(0,3)+h[hand]+key.substr(4,1));
  415
+                },
  416
+                'shiftsymbol':function(key,dir,orig_key) {
  417
+                    dir =  ((dir=='back') ? -1 : 1 );
  418
+                    var c = parseInt(key[2],16)+dir;
  419
+                    return key.substr(0,2)+c.toString(16)[0]+key.substr(3);
411 420
                 }
412 421
             },
413 422
             'first': [
@@ -416,22 +425,32 @@ Composer.prototype = {
416 425
                    round, full circle, twist axis
417 426
                    straight,round,jagged,toward/away from body,arm,wrist,finger
418 427
                  */
419  
-                ['','22a00','22b00','22a14'],
420  
-                ['','26500'],
421  
-                ['','28900'],
422  
-                ['','2b700'],
423  
-                ['','2e300'],
424  
-                ['','2e700'],
425  
-                ['','2d500'],
  428
+                ['up','22a00','22b00','22a14'],
  429
+                ['forward','26500'],
  430
+                ['diagonal','26100'],
  431
+                ['wrist flex','26900'],
  432
+                ['repeated','26a00',/*to*/'27200'],
  433
+                ['','27300'],
  434
+                ['','28000'],
  435
+                ['wrist/arm twist','28100'],
  436
+                ['','24b00'],
  437
+                ['','24200'],
  438
+                ['','28800'],
  439
+                ['','29000'],
426 440
                 ['','29a00'],
  441
+                ['','2e300'],//looks like 29a00
427 442
                 ['','2a200'],
428  
-                ['','2a800'],
429  
-                ['','24200'],
430  
-                ['','2e300'],
  443
+                ['g','2b000'],
  444
+                ['from/to body','2b700'],
  445
+                ['h','2c000'],
  446
+                ['i','2d000'],
  447
+                ['p','2d500'],
  448
+                ['j','2e000'],
  449
+                ['o','2e700'],
431 450
                 ['finger swirl','2f100'],
432  
-                ['curl','21600'],
  451
+                ['curl finger','21600'],
433 452
                 ['uncurl finger','21b00'],
434  
-                ['bend fingers together','22104'], //multiple,rotate
  453
+                ['bend fingers together','22104'],
435 454
                 ['piano fingers','22520']
436 455
             ]
437 456
         },

0 notes on commit ff7af96

Please sign in to comment.
Something went wrong with that request. Please try again.