scenejs icon indicating copy to clipboard operation
scenejs copied to clipboard

Frame CSS background-image: url() object problem

Open Yomyer opened this issue 4 years ago • 1 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 avatar May 10 '20 23:05 Yomyer

@Yomyer

scenejs 1.1.7 is released. Check it again.

Thank you :)

daybrush avatar May 11 '20 11:05 daybrush