I've added a background image as
var img = new Image();
img.src = 'img/1.png';
var options = {
// Make Transparent fill
secondaryColor : 'hsla(0, 0%, 100%, 0)',
backgroundShapes : [LC.createShape('Image', {x: 0, y: 0, image: img})]
};
var lc = LC.init(document.getElementsByClassName('literally core')[0], options);
By default, the canvas has min-height of 400px as defined in LC css and width is of entire screen width. I need to resize the canvas to exactly the height and width of Background image.
If BG image is 700 x 392, I need my canvas to be of 700 x 392 (width & height respectively). I can't seem to find any API's to achieve this.
Am I missing any available API or this have to controlled manually by getting the width & height of image and then restricting canvas size to that size..?
Small example to achieve this is appreciated.