@lightningjs/blits 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/boilerplate/package.json +1 -1
- package/package.json +1 -1
- package/src/element.js +10 -1
- package/src/lib/codegenerator/generator.js +1 -1
package/CHANGELOG.md
CHANGED
package/boilerplate/package.json
CHANGED
package/package.json
CHANGED
package/src/element.js
CHANGED
|
@@ -284,9 +284,17 @@ const Element = {
|
|
|
284
284
|
v: props[prop],
|
|
285
285
|
f,
|
|
286
286
|
timeout: setTimeout(() => {
|
|
287
|
+
value.start &&
|
|
288
|
+
typeof value.start === 'function' &&
|
|
289
|
+
value.start.call(this.component, this, prop, props[prop])
|
|
287
290
|
f.start()
|
|
288
291
|
.waitUntilStopped()
|
|
289
292
|
.then(() => delete this.scheduledTransitions[prop])
|
|
293
|
+
.then(() => {
|
|
294
|
+
value.end &&
|
|
295
|
+
typeof value.end === 'function' &&
|
|
296
|
+
value.end.call(this.component, this, prop, props[prop])
|
|
297
|
+
})
|
|
290
298
|
.then(resolve)
|
|
291
299
|
}, value.delay || 0),
|
|
292
300
|
}
|
|
@@ -295,11 +303,12 @@ const Element = {
|
|
|
295
303
|
},
|
|
296
304
|
}
|
|
297
305
|
|
|
298
|
-
export default (config) =>
|
|
306
|
+
export default (config, component) =>
|
|
299
307
|
Object.assign(Object.create(Element), {
|
|
300
308
|
node: null,
|
|
301
309
|
setProperties: [],
|
|
302
310
|
scheduledTransitions: {},
|
|
303
311
|
initData: {},
|
|
304
312
|
config,
|
|
313
|
+
component,
|
|
305
314
|
})
|
|
@@ -56,7 +56,7 @@ const generateElementCode = function (
|
|
|
56
56
|
|
|
57
57
|
renderCode.push(`
|
|
58
58
|
if(!${elm}) {
|
|
59
|
-
${elm} = this.element({componentId: component[Symbol.for('id')], parent: parent || 'root'})
|
|
59
|
+
${elm} = this.element({componentId: component[Symbol.for('id')], parent: parent || 'root'}, component)
|
|
60
60
|
}
|
|
61
61
|
const elementConfig${counter} = {}
|
|
62
62
|
`)
|