Switches phase to next one.

This method is automatically invoked each time a transition ends
on DOM element added as phase trigger.

@fqn Phaser.prototype.nextPhase
979290
function nextPhase(priv) {
  setPhase(priv, PHASE_VALUES[(PHASE_VALUES.indexOf(priv.phase) + 1) % PHASE_VALUES.length]);
}
605144
function _transitionComplete() {
    this.trigger( BaseTransition.END_EVENT, { target: this } );
    if ( contains( element, classObject.EXPANDED ) &&
         element.scrollHeight > previousHeight ) {
      element.style.maxHeight = element.scrollHeight + 'px';
    }
  }
425015
public void endDataSwapPhase(){

        if (nextMap == null) {
            throw new IllegalStateException("Cannot call PhasedHeapFriendlyHashMap.endDataSwapPhase(), not currently in data swap phase");
        }

        HeapFriendlyHashMap<K, V> temp = currentMap;

        currentMap = nextMap;
        nextMap = null;

        temp.releaseObjectArrays();

        recycler.clearNextCycleObjectArrays();
    }
1211611
function MoveTransition( element ) {

  const _baseTransition = new BaseTransition( element, CLASSES );

  /**
   * @returns {MoveTransition} An instance.
   */
  function init() {
    _baseTransition.init();
    const _transitionCompleteBinded = _transitionComplete.bind( this );
    _baseTransition.addEventListener(
      BaseTransition.END_EVENT,
      _transitionCompleteBinded
    );
    return this;
  }

  /**
   * Handle the end of a transition.
   */
  function _transitionComplete() {
    this.trigger( BaseTransition.END_EVENT, { target: this } );
  }

  /**
   * Move to the element's original coordinates.
   * @returns {MoveTransition} An instance.
   */
  function moveToOrigin() {
    _baseTransition.applyClass( CLASSES.MOVE_TO_ORIGIN );

    return this;
  }

  /**
   * Move to the left by applying a utility move class.
   * @param {Number} count
   *   How many times to move left as a multiplication of the element's width.
   * @returns {MoveTransition} An instance.
   */
  function moveLeft( count ) {
    count = count || 1;
    const moveClasses = [
      CLASSES.MOVE_LEFT,
      CLASSES.MOVE_LEFT_2X,
      CLASSES.MOVE_LEFT_3X
    ];

    if ( count < 1 || count > moveClasses.length ) {
      throw new Error( 'MoveTransition: moveLeft count is out of range!' );
    }

    _baseTransition.applyClass( moveClasses[count - 1] );

    return this;
  }

  /**
   * Move to the right by applying a utility move class.
   * @returns {MoveTransition} An instance.
   */
  function moveRight() {
    _baseTransition.applyClass( CLASSES.MOVE_RIGHT );

    return this;
  }

  /**
   * Move up by applying a utility move class.
   * @returns {MoveTransition} An instance.
   */
  function moveUp() {
    _baseTransition.applyClass( CLASSES.MOVE_UP );

    return this;
  }

  // Attach public events.
  this.addEventListener = Events.on;
  this.trigger = Events.trigger;
  this.removeEventListener = Events.off;

  this.animateOff = _baseTransition.animateOff;
  this.animateOn = _baseTransition.animateOn;
  this.halt = _baseTransition.halt;
  this.isAnimated = _baseTransition.isAnimated;
  this.setElement = _baseTransition.setElement;
  this.remove = _baseTransition.remove;

  this.init = init;
  this.moveLeft = moveLeft;
  this.moveRight = moveRight;
  this.moveToOrigin = moveToOrigin;
  this.moveUp = moveUp;

  return this;
}
1339179
function JssorSliderProgressChangeEventHandler(slideIndex, progress, progressBegin, idleBegin, idleEnd, progressEnd) {
    //this event fires continuously within the process of current slide
    //tipical usage
    var progressString = Math.round(progress / progressEnd * 100) + "%";

    var args = [slideIndex, progress, progressBegin, idleBegin, idleEnd, progressEnd];
    console.log(" args: " + args.join(","));
}
821391
@Override
    public void nextState(PHATInterface phatInterface) {
        switch (state) {
            case NOT_INIT:
                initState(phatInterface);
                setState(STATE.STARTED);
                break;
            case STARTED:
                if(isFinished(phatInterface)) {
                    setState(FINISHED);
                } else {
                    simpleNextState(phatInterface);
                }
                break;
            case FINISHED:
                break;
            case INTERRUPTED:
                if (finishCondition != null) {
                    finishCondition.automatonInterrupted(this);
                }
                interrupt(phatInterface);
                break;
            case RESUMED:
                if (finishCondition != null) {
                    finishCondition.automatonResumed(this);
                }
                resume(phatInterface);
                setState(STATE.STARTED);
                break;
        }    
    }
255896
private void performStepAnimation(final Node nextSlide) {

        // setSlideLocked(true);
        this.slideStepAnimation = ParallelTransitionBuilder.create()

                                                           .onFinished(new EventHandler<ActionEvent>() {

                                                               @Override
                                                               public void handle(final ActionEvent event) {
                                                                   AbstractTemplateView.this.currentSubSlide = nextSlide;
                                                                   // AbstractTemplateView.this.setSlideLocked(false);
                                                               }
                                                           })

                                                           .children(
                                                                     SequentialTransitionBuilder.create()
                                                                                                .node(this.currentSubSlide)
                                                                                                .children(
                                                                                                          TranslateTransitionBuilder.create()
                                                                                                                                    .duration(Duration.millis(400))
                                                                                                                                    .fromY(0)
                                                                                                                                    .toY(-700)
                                                                                                                                    // .fromZ(-10)
                                                                                                                                    .build(),
                                                                                                          TimelineBuilder.create()
                                                                                                                         .keyFrames(
                                                                                                                                    new KeyFrame(
                                                                                                                                                 Duration.millis(0),
                                                                                                                                                 new KeyValue(
                                                                                                                                                              this.currentSubSlide.visibleProperty(),
                                                                                                                                                              true)),
                                                                                                                                    new KeyFrame(
                                                                                                                                                 Duration.millis(1),
                                                                                                                                                 new KeyValue(
                                                                                                                                                              this.currentSubSlide.visibleProperty(),
                                                                                                                                                              false)))
                                                                                                                         .build())

                                                                                                .build(),
                                                                     SequentialTransitionBuilder.create()
                                                                                                .node(nextSlide)
                                                                                                .children(
                                                                                                          TimelineBuilder.create()
                                                                                                                         .keyFrames(
                                                                                                                                    new KeyFrame(
                                                                                                                                                 Duration.millis(0),
                                                                                                                                                 new KeyValue(
                                                                                                                                                              nextSlide.visibleProperty(),
                                                                                                                                                              false)),
                                                                                                                                    new KeyFrame(
                                                                                                                                                 Duration.millis(1),
                                                                                                                                                 new KeyValue(
                                                                                                                                                              nextSlide.visibleProperty(),
                                                                                                                                                              true)))
                                                                                                                         .build(),
                                                                                                          TranslateTransitionBuilder.create()
                                                                                                                                    .duration(Duration.millis(400))
                                                                                                                                    .fromY(700)
                                                                                                                                    .toY(0)
                                                                                                                                    // .fromZ(-10)
                                                                                                                                    .build())
                                                                                                .build())
                                                           .build();
        this.slideStepAnimation.play();

    }
773340
@Override
	public boolean next() {
		while (true) {
			if (rp.next())
				return true;
			if (current == endBlkNum)
				return false;
			moveToBlock(current + 1);
		}
	}
549411
public static void changePage(JQMContainer container, TransitionIntf<?> transition, boolean reverse) {
        changePage(container, false/*dialog*/, transition, reverse);
    }
934306
function () {
  next = false;
  // add listener to all next steps to provide next() functionality
  event.dispatcher.on(event.step.after, () => {
    recorder.add('Start next pause session', () => {
      if (!next) return;
      return pauseSession();
    });
  });
  recorder.add('Start new session', pauseSession);
}
443226
function changeStep(steps, layer, bool) {
            var visibleStep = steps.filter('.is-selected'),
                delay = (viewportSize() == 'desktop') ? 300 : 0;
            visibleStep.removeClass('is-selected');

            //remove class that make tour target elemment pop when selected
            jQuery(global_target_selectors[getActiveStepCount()]).removeClass('tour-target-element');

            (bool == 'next') && visibleStep.addClass('move-left');

            setTimeout(function () {
                (bool == 'next')
                    ? showStep(visibleStep.next(), layer)
                    : showStep(visibleStep.prev(), layer);

                //add class to make tour target element pop
                jQuery(global_target_selectors[getActiveStepCount()]).addClass('tour-target-element');

                //call onChange trigger if specified
                if (jQuery.isFunction(options.onChanged))
                    options.onChanged(jQuery(global_items[getActiveStepCount()].element));//returns the current layer as JQuery object
            }, delay);
        }
366520
private ParallelTransition buildSlideTransition(final boolean isReverse, final SlideModel<SlideStep> previousSlideModel, final SlideModel<SlideStep> selectedSlideModel) {
        final ParallelTransition slideAnimation = ParallelTransitionBuilder.create().build();

        if (previousSlideModel != null) {
            final Animation a = isReverse ? previousSlideModel.getShowAnimation() : previousSlideModel.getHideAnimation();
            if (a != null) {
                slideAnimation.getChildren().add(a);
            }
        }
        if (this.selectedSlideModel != null) {
            final Animation a = isReverse ? this.selectedSlideModel.getHideAnimation() : this.selectedSlideModel.getShowAnimation();
            if (a != null) {
                slideAnimation.getChildren().add(a);
            }
        }

        final SlideModel<SlideStep> csm = selectedSlideModel;
        // final SlideModel<SlideStep> psm = previousSlideModel;
        slideAnimation.setOnFinished(new javafx.event.EventHandler<ActionEvent>() {

            @Override
            public void handle(final ActionEvent arg0) {
                // // Hide previous slide
                // if (psm != null) {
                // getView().getRootNode().getChildren().removeAll(psm.getRootNode());
                // }

                // FIX ME NOT APPROPRIATED !!!
                if (previousSlideModel instanceof AbstractBaseModel) {
                    ((AbstractBaseModel<?>) previousSlideModel).doHideView(null);
                }
                if (selectedSlideModel instanceof AbstractBaseModel) {
                    ((AbstractBaseModel<?>) selectedSlideModel).doShowView(null);
                }

                // Hide all other slides
                if (csm != null) {
                    Node node;
                    for (int i = view().node().getChildren().size() - 1; i >= 0; i--) {
                        node = view().node().getChildren().get(i);
                        if (csm.node() != node) {
                            view().node().getChildren().remove(node);
                        }
                    }
                }
            }
        });
        return slideAnimation;
    }
904655
private void switchToBackward() {
        assert((checkDir > 0 && seq == rawSeq) || (checkDir == 0 && pos == start));
        if(checkDir > 0) {
            // Turn around from forward checking.
            limit = segmentLimit = pos;
            if(pos == segmentStart) {
                start = rawStart;
                checkDir = -1;  // Check backward.
            } else {  // pos > segmentStart
                checkDir = 0;  // Stay in FCD segment.
            }
        } else {
            // Reached the start of the FCD segment.
            if(seq == rawSeq) {
                // The input text segment is FCD, extend it backward.
            } else {
                // The input text segment needed to be normalized.
                // Switch to checking backward from it.
                seq = rawSeq;
                pos = limit = segmentLimit = segmentStart;
            }
            start = rawStart;
            checkDir = -1;
        }
    }
1077262
function _addEventListener() {
    _isAnimating = true;
    // If transition is not supported, call handler directly (IE9/OperaMini).
    if ( _transitionEndEvent ) {
      _dom.addEventListener( _transitionEndEvent,
                             _transitionCompleteBinded );
      this.trigger( BaseTransition.BEGIN_EVENT, { target: this } );
    } else {
      this.trigger( BaseTransition.BEGIN_EVENT, { target: this } );
      _transitionCompleteBinded();
    }
  }
1249327
protected void putPhase(Map<String, DevelopmentPhase> map, String key, DevelopmentPhase phase) {

    String newKey = key.toLowerCase(Locale.US);
    while (newKey != null) {
      DevelopmentPhase existingPhase = map.get(newKey);
      if ((existingPhase != null) && (existingPhase != phase)) {
        throw new IllegalStateException("Development phase '" + phase + "' has key '" + newKey + "' that is already mapped to '" + existingPhase + "'.");
      }
      map.put(newKey, phase);
      if (newKey.contains("-")) {
        newKey = newKey.replace("-", "");
      } else {
        newKey = null;
      }
    }
  }
690584
function getNextPhase(currentPhase) {
			
			var nextPhase = currentPhase;
			
			// Ensure we have valid swipe (under time and over distance  and check if we are out of bound...)
			var validTime = validateSwipeTime();
			var validDistance = validateSwipeDistance();
			var didCancel = didSwipeBackToCancel();
						
			//If we have exceeded our time, then cancel	
			if(!validTime || didCancel) {
				nextPhase = PHASE_CANCEL;
			}
			//Else if we are moving, and have reached distance then end
			else if (validDistance && currentPhase == PHASE_MOVE && (!options.triggerOnTouchEnd || options.triggerOnTouchLeave) ) {
				nextPhase = PHASE_END;
			} 
			//Else if we have ended by leaving and didn't reach distance, then cancel
			else if (!validDistance && currentPhase==PHASE_END && options.triggerOnTouchLeave) {
				nextPhase = PHASE_CANCEL;
			}
			
			return nextPhase;
		}
341022
public void prevStep() {
        if (currentStepIndex > 0) {
            Widget w = getWidget(currentStepIndex);
            if (w instanceof MaterialStep) {
                MaterialStep step = (MaterialStep) w;
                step.setActive(false);

                // prev step
                int prevStepIndex = getWidgetIndex(step) - 1;
                if (prevStepIndex >= 0) {
                    for (int i = prevStepIndex; i >= 0; i--) {
                        w = getWidget(i);
                        if (!(w instanceof MaterialStep)) {
                            continue;
                        }
                        MaterialStep prevStep = (MaterialStep) w;
                        if (prevStep.isEnabled() && prevStep.isVisible()) {
                            prevStep.setActive(true);
                            setCurrentStepIndex(i);
                            PreviousEvent.fire(MaterialStepper.this);
                            break;
                        }
                    }
                }
            }
        } else {
            GWT.log("You have reached the minimum step.");
        }
    }