Sha256: a8a4cb257fdfbe1d0263955fe9176cf71c5a0a4505ea03d90bbada1d7ef0eb5c

Contents?: true

Size: 599 Bytes

Versions: 6

Compression:

Stored size: 599 Bytes

Contents

var _ = require('../util')
var queue = []
var queued = false

/**
 * Push a job into the queue.
 *
 * @param {Function} job
 */

exports.push = function (job) {
  queue.push(job)
  if (!queued) {
    queued = true
    _.nextTick(flush)
  }
}

/**
 * Flush the queue, and do one forced reflow before
 * triggering transitions.
 */

function flush () {
  // Force layout
  var f = document.documentElement.offsetHeight
  for (var i = 0; i < queue.length; i++) {
    queue[i]()
  }
  queue = []
  queued = false
  // dummy return, so js linters don't complain about
  // unused variable f
  return f
}

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
statixite-1.0.2 vendor/assets/bower_components/vue/src/transition/queue.js
statixite-1.0.1 vendor/assets/bower_components/vue/src/transition/queue.js
statixite-1.0.0 vendor/assets/bower_components/vue/src/transition/queue.js
plate-lang-0.1.2 skeleton/vendor/vue/src/transition/queue.js
plate-lang-0.1.1 skeleton/vendor/vue/src/transition/queue.js
plate-lang-0.1.0 skeleton/vendor/vue/src/transition/queue.js