docs: function onStateChanged(opts, that) {
          var eventProcessor = {
            resize: function resize(that) {
              if (opts && opts.onResize) {
                opts.onResize.call(that, that);
              } else if (this.onResize) {
                this.onResize.call(that, that);
              }
            },
            move: function move() {}
          };
          if (that.state in eventProcessor) {
            eventProcessor[that.state].call(this, that);
          }
  
          if (opts && opts.onStateChanged) {
            opts.onStateChanged.call(that, that);
          } else if (this.onStateChanged) {
            this.onStateChanged.call(that, that);
          }
          return true;
        }