Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 0: // ACTIVE-A
- // grow circle around nfc icon, display tap_text & timeout chart when circle is max, maintain nfc icon for 3-4 seconds
- // initialize nfcAnimState values
- if (this.nfcAnimState.iconState == -1) {
- this.nfcAnimState.iconState = 0;
- this.nfcAnimState.circleSize = this.nfcAnimConfig.genericIconSize;
- this.nfcAnimState.cx = this.selectedDroplet.posx + this.selectedDroplet.scaledWidth / 2;
- this.nfcAnimState.cy = this.selectedDroplet.posy + this.selectedDroplet.scaledHeight / 2;
- } else if (this.nfcAnimState.iconState == 0) {
- // otherwise run this state, increasing circleSize to it's configured max
- if (this.nfcAnimState.circleSize < this.nfcAnimConfig.circleSize) {
- this.nfcAnimState.circleSize += this.nfcAnimConfig.openSpeed;
- } else {
- // circleSize max
- // TODO: timeout chart
- this.nfcAnimState.rotateTextState = 0; // display tap_text
- this.nfcAnimState.rotateTextPosition = 0; // set rotation to 0
- // once circleSize has reached max, we can move to ACTIVE-B state after a delay
- if (this.nfcAnimState.timeout01 == null) {
- var that = this;
- setTimeout(function() {
- that.nfcState = 1;
- }, this.nfcAnimConfig.timeout01Delay);
- }
- }
- }
- break;
- case 1: // ACTIVE-B
- // move to tap_icon, add close_icon, maintain tap_text and timeout chart rotation
- this.nfcAnimState.iconState = 1;
- this.nfcAnimState.displayClose = true;
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement