daybrush / scenejs

🎬 Scene.js is JavaScript & CSS timeline-based animation library

Home Page:https://daybrush.com/scenejs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frame CSS background-image: url() object problem

Yomyer opened this issue · comments

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

@Yomyer

scenejs 1.1.7 is released. Check it again.

Thank you :)