polotno-node
Advanced tools
Comparing version 2.9.7 to 2.9.8
@@ -107,5 +107,20 @@ const path = require('path'); | ||
window.config.setAssetLoadTimeout(timeout); | ||
} else { | ||
console.error( | ||
'setAssetLoadTimeout function is not defined in the client.' | ||
); | ||
} | ||
}, args[1].assetLoadTimeout); | ||
} | ||
if (args[1]?.fontLoadTimeout) { | ||
await page.evaluate((timeout) => { | ||
if (window.config && window.config.setFontLoadTimeout) { | ||
window.config.setFontLoadTimeout(timeout); | ||
} else { | ||
console.error( | ||
'setFontLoadTimeout function is not defined in the client.' | ||
); | ||
} | ||
}, args[1].assetLoadTimeout); | ||
} | ||
if (args[1]?.htmlTextRenderEnabled) { | ||
@@ -115,2 +130,6 @@ await page.evaluate(() => { | ||
window.config.unstable_useHtmlTextRender(true); | ||
} else { | ||
console.error( | ||
'unstable_useHtmlTextRender function is not defined in the client.' | ||
); | ||
} | ||
@@ -126,2 +145,6 @@ }); | ||
window.config.unstable_setTextVerticalResizeEnabled(true); | ||
} else { | ||
console.error( | ||
'unstable_setTextVerticalResizeEnabled function is not defined in the client.' | ||
); | ||
} | ||
@@ -134,2 +157,6 @@ }); | ||
window.config.unstable_setTextOverflow(overflow); | ||
} else { | ||
console.error( | ||
'unstable_setTextOverflow function is not defined in the client.' | ||
); | ||
} | ||
@@ -143,2 +170,6 @@ }, args[1].textOverflow); | ||
}); | ||
} else { | ||
console.error( | ||
'onLoadError function is not defined in the client. Error handling will not work.' | ||
); | ||
} | ||
@@ -145,0 +176,0 @@ }); |
{ | ||
"name": "polotno-node", | ||
"version": "2.9.7", | ||
"version": "2.9.8", | ||
"description": "Polotno workflow from NodeJS", | ||
@@ -29,3 +29,3 @@ "main": "index.js", | ||
"pngjs": "^7.0.0", | ||
"polotno": "^2.4.26", | ||
"polotno": "^2.4.31", | ||
"react": "^18.2.0", | ||
@@ -32,0 +32,0 @@ "react-dom": "^18.2.0", |
@@ -168,3 +168,3 @@ # Polotno-node | ||
You can add `assetLoadTimeout` attribute to `attrs` object. It will be used to set timeout for loading assets (images, fonts, etc). By default it is 30000ms. | ||
You can add `assetLoadTimeout` attribute to `attrs` object. It will be used to set timeout for loading assets. By default it is 30000ms. | ||
@@ -175,2 +175,10 @@ ```js | ||
### `attrs.assetFontTimeout` | ||
Timeout for loading fonts. By default it is 6000ms. | ||
```js | ||
const url = await instance.jsonToPDFDataURL(json, { assetFontTimeout: 10000 }); | ||
``` | ||
### `attrs.htmlTextRenderEnabled` | ||
@@ -177,0 +185,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1229430
5497
415
1