Open alexanderGugel opened 8 years ago
onSizeChange hasn't been called.
Fixes #476
'use strict'; var DOMElement = require('famous/dom-renderables/DOMElement'); var FamousEngine = require('famous/core/FamousEngine'); FamousEngine.init(); var node = FamousEngine.createScene().addChild(); var el = new DOMElement(node, { content: 'Hello', properties: { background: 'red', fontSize: '30px' } }); node .setSizeMode('render', 'render') .setAlign(0.5, 0.5) .setMountPoint(0.5, 0.5) .setOrigin(0.5, 0.5); var spinner = node.addComponent({ onUpdate: function(time) { node.setRotation(0, time / 1000, 0); node.requestUpdateOnNextTick(spinner); }, onSizeChange: function (x, y, z) { console.log(x, y, z); } }); setTimeout(function () { el.setContent('A'); }, 1000); node.requestUpdate(spinner);
@michaelobriena
onSizeChange hasn't been called.
Fixes #476
Example
@michaelobriena