fastdom-sequencer
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
root["sequencer"] = factory(root["fastdom"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
@@ -58,5 +58,5 @@ /******/ // The module cache | ||
var fastdom = __webpack_require__(1); | ||
var fastdom = __webpack_require__(2); | ||
var debug = 1 ? console.log.bind(console, '[sequencer]') : function() {}; | ||
@@ -135,3 +135,3 @@ var symbol = Symbol(); | ||
data.pending[type] = this.fastdom.measure(() => { | ||
data.pending[type] = this.fastdom.measure(function() { | ||
delete data.pending[type]; | ||
@@ -186,6 +186,6 @@ interaction.reset(scoped()); | ||
var complete = interaction.complete | ||
.then(() => { | ||
.then(function() { | ||
remove(this.interactions, complete); | ||
delete interactions[type]; | ||
}); | ||
}.bind(this)); | ||
@@ -234,3 +234,3 @@ this.interactions.push(complete); | ||
return this.after([this.interactions], () => { | ||
return this.after([this.interactions], function() { | ||
debug('animate (2)'); | ||
@@ -241,3 +241,4 @@ var promise = this.task('mutate', task.bind(this, el)); | ||
var complete = promise | ||
.then(_result => { | ||
.then(function(_result) { | ||
console.log('........', result); | ||
result = _result; | ||
@@ -247,10 +248,10 @@ return animationend(el || result, safety); | ||
.then(() => { | ||
.then(function() { | ||
remove(this.animations, complete); | ||
return result; | ||
}); | ||
}.bind(this)); | ||
this.animations.push(complete); | ||
return complete; | ||
}); | ||
}.bind(this)); | ||
}, | ||
@@ -263,3 +264,3 @@ | ||
wrapper: this.scopeFn.bind(this, this.scope), | ||
oncancel: () => fastdom.clear(task.id) | ||
oncancel: function() { fastdom.clear(task.id); } | ||
}); | ||
@@ -289,6 +290,6 @@ }, | ||
debug('measure (1)'); | ||
return this.after([this.interactions, this.animations], () => { | ||
return this.after([this.interactions, this.animations], function() { | ||
debug('measure (2)'); | ||
return this.task('measure', task, ctx); | ||
}); | ||
}.bind(this)); | ||
}, | ||
@@ -315,6 +316,6 @@ | ||
debug('mutate (1)'); | ||
return this.after([this.interactions, this.animations], () => { | ||
return this.after([this.interactions, this.animations], function() { | ||
debug('mutate (2)'); | ||
return this.task('mutate', task, ctx); | ||
}); | ||
}.bind(this)); | ||
}, | ||
@@ -406,3 +407,3 @@ | ||
var id; | ||
var promise = new Promise((resolve, reject) => { | ||
var promise = new Promise(function(resolve, reject) { | ||
id = fastdom[type](function() { | ||
@@ -483,3 +484,3 @@ try { resolve(fn()); } | ||
// debounce approach to judge completion | ||
this.timeout = setTimeout(() => this.resolve(), 300); | ||
this.timeout = setTimeout(this.resolve.bind(this), 300); | ||
}, | ||
@@ -573,3 +574,3 @@ | ||
callback = this.wrapper(callback); | ||
return value => { | ||
return function(value) { | ||
if (self.canceled) return; | ||
@@ -611,9 +612,15 @@ var result = callback(value); | ||
measure: function(task, ctx) { | ||
return this.create(this.promise.then(result => | ||
this.sequencer.measure(() => task(result), ctx))); | ||
return this.create(this.promise.then(function(result) { | ||
return this.sequencer.measure(function() { | ||
return task(result); | ||
}, ctx); | ||
}.bind(this))); | ||
}, | ||
mutate: function(task, ctx) { | ||
return this.create(this.promise.then(result => | ||
this.sequencer.mutate(() => task(result), ctx))); | ||
return this.create(this.promise.then(function(result) { | ||
return this.sequencer.mutate(function() { | ||
return task(result); | ||
}, ctx); | ||
}.bind(this))); | ||
}, | ||
@@ -627,4 +634,5 @@ | ||
return this.create(this.promise.then(result => | ||
this.sequencer.animate(el || result, safety, task))); | ||
return this.create(this.promise.then(function(result) { | ||
return this.sequencer.animate(el || result, safety, task); | ||
}.bind(this))); | ||
} | ||
@@ -687,6 +695,6 @@ }; | ||
function Deferred() { | ||
this.promise = new Promise((resolve, reject) => { | ||
this.promise = new Promise(function(resolve, reject) { | ||
this.resolve = resolve; | ||
this.reject = reject; | ||
}); | ||
}.bind(this)); | ||
} | ||
@@ -708,7 +716,6 @@ | ||
/***/ }, | ||
/* 1 */, | ||
/* 2 */ | ||
/* 1 */ | ||
/***/ function(module, exports) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_2__; | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_1__; | ||
@@ -715,0 +722,0 @@ /***/ } |
{ | ||
"name": "fastdom-sequencer", | ||
"description": "", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "fastdom-sequencer.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -77,3 +77,3 @@ | ||
data.pending[type] = this.fastdom.measure(() => { | ||
data.pending[type] = this.fastdom.measure(function() { | ||
delete data.pending[type]; | ||
@@ -128,6 +128,6 @@ interaction.reset(scoped()); | ||
var complete = interaction.complete | ||
.then(() => { | ||
.then(function() { | ||
remove(this.interactions, complete); | ||
delete interactions[type]; | ||
}); | ||
}.bind(this)); | ||
@@ -176,3 +176,3 @@ this.interactions.push(complete); | ||
return this.after([this.interactions], () => { | ||
return this.after([this.interactions], function() { | ||
debug('animate (2)'); | ||
@@ -183,3 +183,3 @@ var promise = this.task('mutate', task.bind(this, el)); | ||
var complete = promise | ||
.then(_result => { | ||
.then(function(_result) { | ||
console.log('........', result); | ||
@@ -190,10 +190,10 @@ result = _result; | ||
.then(() => { | ||
.then(function() { | ||
remove(this.animations, complete); | ||
return result; | ||
}); | ||
}.bind(this)); | ||
this.animations.push(complete); | ||
return complete; | ||
}); | ||
}.bind(this)); | ||
}, | ||
@@ -206,3 +206,3 @@ | ||
wrapper: this.scopeFn.bind(this, this.scope), | ||
oncancel: () => fastdom.clear(task.id) | ||
oncancel: function() { fastdom.clear(task.id); } | ||
}); | ||
@@ -232,6 +232,6 @@ }, | ||
debug('measure (1)'); | ||
return this.after([this.interactions, this.animations], () => { | ||
return this.after([this.interactions, this.animations], function() { | ||
debug('measure (2)'); | ||
return this.task('measure', task, ctx); | ||
}); | ||
}.bind(this)); | ||
}, | ||
@@ -258,6 +258,6 @@ | ||
debug('mutate (1)'); | ||
return this.after([this.interactions, this.animations], () => { | ||
return this.after([this.interactions, this.animations], function() { | ||
debug('mutate (2)'); | ||
return this.task('mutate', task, ctx); | ||
}); | ||
}.bind(this)); | ||
}, | ||
@@ -349,3 +349,3 @@ | ||
var id; | ||
var promise = new Promise((resolve, reject) => { | ||
var promise = new Promise(function(resolve, reject) { | ||
id = fastdom[type](function() { | ||
@@ -426,3 +426,3 @@ try { resolve(fn()); } | ||
// debounce approach to judge completion | ||
this.timeout = setTimeout(() => this.resolve(), 300); | ||
this.timeout = setTimeout(this.resolve.bind(this), 300); | ||
}, | ||
@@ -516,3 +516,3 @@ | ||
callback = this.wrapper(callback); | ||
return value => { | ||
return function(value) { | ||
if (self.canceled) return; | ||
@@ -554,9 +554,15 @@ var result = callback(value); | ||
measure: function(task, ctx) { | ||
return this.create(this.promise.then(result => | ||
this.sequencer.measure(() => task(result), ctx))); | ||
return this.create(this.promise.then(function(result) { | ||
return this.sequencer.measure(function() { | ||
return task(result); | ||
}, ctx); | ||
}.bind(this))); | ||
}, | ||
mutate: function(task, ctx) { | ||
return this.create(this.promise.then(result => | ||
this.sequencer.mutate(() => task(result), ctx))); | ||
return this.create(this.promise.then(function(result) { | ||
return this.sequencer.mutate(function() { | ||
return task(result); | ||
}, ctx); | ||
}.bind(this))); | ||
}, | ||
@@ -570,4 +576,5 @@ | ||
return this.create(this.promise.then(result => | ||
this.sequencer.animate(el || result, safety, task))); | ||
return this.create(this.promise.then(function(result) { | ||
return this.sequencer.animate(el || result, safety, task); | ||
}.bind(this))); | ||
} | ||
@@ -630,6 +637,6 @@ }; | ||
function Deferred() { | ||
this.promise = new Promise((resolve, reject) => { | ||
this.promise = new Promise(function(resolve, reject) { | ||
this.resolve = resolve; | ||
this.reject = reject; | ||
}); | ||
}.bind(this)); | ||
} | ||
@@ -636,0 +643,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37747
1193