fuse-open / fuselibs

Fuselibs is the Uno-libraries that provide the UI framework used in Fuse apps
https://npmjs.com/package/@fuse-open/fuselibs
MIT License
176 stars 72 forks source link

Add capability to capture/make screenshot content of a Panel and save it to the file #1461

Closed ichan-mb closed 1 year ago

ichan-mb commented 1 year ago

This add one ScriptPromise called capture to the Panel.

Example

<JavaScript>
    module.exports = {
        save: function (args) {
            p.capture().then((file) => {
                console.log(file);
            })
        }
    }
</JavaScript>
<StackPanel ux:Name="p">
    <Text Value="Demo capture" />
    <Button Text="Save" Clicked="{save}" />
</Panel>

This PR contains: