not showing bg image unless I resize browser

20 views
Skip to first unread message

mark....@sensei-solutions.com

unread,
Feb 21, 2019, 10:04:52 AM2/21/19
to Literally Canvas
Hi

I have the follow code

     lcObj = LC.init(document.getElementById("lc"), { imageURLPrefix: '/Content/_assets/lc-images' });
            var backgroundImage = new Image();
            backgroundImage.height = 240;
            backgroundImage.width = 355;
            backgroundImage.src = $('#myImg')[0].src;

            lcObj.saveShape(LC.createShape('Image', { x: 10, y: 10, image: backgroundImage }));
            lcObj.loadSnapshot();

Its not allowing me to draw on the canvas or show the bg image unless i resize browser, then it all appears
Any ideas?
Reply all
Reply to author
Forward
0 new messages