File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,11 @@ function render() {
7373 // Set background image if needed
7474 if ( design && design . backgroundImage ) {
7575 const DPR = window . devicePixelRatio ;
76+ const width = Math . ceil ( state . width * DPR ) ;
77+ const height = Math . ceil ( state . height * DPR ) ;
7678
7779 const baseUrl = 'https://czi3m2qn.cloudimg.io/s/crop' ;
78- const cropUrl = `${ baseUrl } /${ state . width * DPR } x${ state . height * DPR } ` ;
80+ const cropUrl = `${ baseUrl } /${ width } x${ height } ` ;
7981 const url = `${ cropUrl } /${ design . backgroundImage } ` ;
8082
8183 window . document . body . setAttribute ( 'style' , `
@@ -90,6 +92,12 @@ function render() {
9092
9193 // Render HTML content
9294 textContainer . innerHTML = content . text ;
95+
96+ try {
97+ buildfire . appearance . ready ( ) ;
98+ } catch ( err ) {
99+ console . log ( 'appearance.ready() failed, is sdk up to date?' ) ;
100+ }
93101}
94102
95103
You can’t perform that action at this time.
0 commit comments