Frame CSS background-image: url() object problem
Yomyer opened this issue · comments
Sergio Caballero commented
Describe the bug
Problems with Frame when adding a background or background-image URL, it returns an [Object object] when you do toCSS();
Desktop (please complete the following information):
- OS: Mac
- Browser Chrome
- Version 81.0.4044.138
Additional context
Don't Work
import { Frame } from 'scenejs';
const frame = new Frame({
'background-repeat': 'no-repeat',
'background-position': 'center center',
'background-size': 'cover',
'background-image': 'url(https://www.clautic.com/league/wp-content/uploads/unicorn-wallpaper.jpg)',
});
console.log(frame.toCSS());
Work
import { Frame } from 'scenejs';
const frame = new Frame({
'background-repeat': 'no-repeat',
'background-position': 'center center',
'background-size': 'cover'
});
console.log(`${frame.toCSS()}; background-image: url(https://www.clautic.com/league/wp-content/uploads/unicorn-wallpaper.jpg)`);
Thanks man
Daybrush (Younkue Choi) commented