Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. case 0: // ACTIVE-A
  2.             // grow circle around nfc icon, display tap_text & timeout chart when circle is max, maintain nfc icon for 3-4 seconds
  3.  
  4.             // initialize nfcAnimState values
  5.             if (this.nfcAnimState.iconState == -1) {
  6.                 this.nfcAnimState.iconState = 0;
  7.                 this.nfcAnimState.circleSize = this.nfcAnimConfig.genericIconSize;
  8.                 this.nfcAnimState.cx = this.selectedDroplet.posx + this.selectedDroplet.scaledWidth / 2;
  9.                 this.nfcAnimState.cy = this.selectedDroplet.posy + this.selectedDroplet.scaledHeight / 2;
  10.             } else if (this.nfcAnimState.iconState == 0) {
  11.                 // otherwise run this state, increasing circleSize to it's configured max
  12.                 if (this.nfcAnimState.circleSize < this.nfcAnimConfig.circleSize) {
  13.                     this.nfcAnimState.circleSize += this.nfcAnimConfig.openSpeed;
  14.                 } else {
  15.                     // circleSize max
  16.                     // TODO: timeout chart
  17.                     this.nfcAnimState.rotateTextState = 0; // display tap_text
  18.                     this.nfcAnimState.rotateTextPosition = 0; // set rotation to 0
  19.  
  20.                     // once circleSize has reached max, we can move to ACTIVE-B state after a delay
  21.                     if (this.nfcAnimState.timeout01 == null) {
  22.                         var that = this;
  23.                         setTimeout(function() {
  24.                             that.nfcState = 1;
  25.                         }, this.nfcAnimConfig.timeout01Delay);
  26.                     }
  27.                 }
  28.             }
  29.             break;
  30.         case 1: // ACTIVE-B
  31.             // move to tap_icon, add close_icon, maintain tap_text and timeout chart rotation
  32.             this.nfcAnimState.iconState = 1;
  33.             this.nfcAnimState.displayClose = true;
  34.             break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement