tryFinish = function () {
        if (--counter > 0) return;

        var hasLayoutChanged = grid._layout.id !== layout.id;
        var callback = isFunction(instant) ? instant : onFinish;

        if (!hasLayoutChanged) {
          grid._isLayoutFinished = true;
        }

        if (isFunction(callback)) {
          callback(layout.items.slice(0), hasLayoutChanged);
        }

        if (!hasLayoutChanged && grid._hasListeners(EVENT_LAYOUT_END)) {
          grid._emit(EVENT_LAYOUT_END, layout.items.slice(0));
        }
      }
Calculate and apply item positions.

@private
@param {Object} layout