PHP Classes

File: public/js/lib/vue/src/transition/queue.js

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy   Silex MVC Blog   public/js/lib/vue/src/transition/queue.js   Download  
File: public/js/lib/vue/src/transition/queue.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Silex MVC Blog
MVC based blog using on the Silex micro-framework
Author: By
Last change:
Date: 8 years ago
Size: 612 bytes
 

Contents

Class file image Download
import { nextTick } from '../util/index' let queue = [] let queued = false /** * Push a job into the queue. * * @param {Function} job */ export function pushJob (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 }