code: function stop() {
      return function stopImpl(clearQueue, jumpToEnd) {
        var self = this;
        var selfIsArrayLike = self.length !== undefined;
        var all = selfIsArrayLike ? self : [self]; // put in array if not array-like
  
        var cy = this._private.cy || this;
  
        if (!cy.styleEnabled()) {
          return this;
        }
  
        for (var i = 0; i < all.length; i++) {
          var ele = all[i];
          var _p = ele._private;
          var anis = _p.animation.current;
  
          for (var j = 0; j < anis.length; j++) {
            var ani = anis[j];
            var ani_p = ani._private;
  
            if (jumpToEnd) {
              // next iteration of the animation loop, the animation
              // will go straight to the end and be removed
              ani_p.duration = 0;
            }
          } // clear the queue of future animations
  
  
          if (clearQueue) {
            _p.animation.queue = [];
          }
  
          if (!jumpToEnd) {
            _p.animation.current = [];
          }
        } // we have to notify (the animation loop doesn't do it for us on `stop`)
  
  
        cy.notify('draw');
        return this;
      };
    }
docs: animate