Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature drawing panel #1470

Merged
merged 2 commits into from
May 1, 2023
Merged

Conversation

ichan-mb
Copy link
Member

A Panel that can be used to draw lines using your finger. As the DrawingPanel is native only, it must be contained in a NativeViewHost.

To use this control, You need to add a reference to Fuse.Controls.DrawingPanel and Fuse.ImageTools on your .unoproj file

Example

<App Background="White">
    <JavaScript>
        var drawing = DrawingPanel

        module.exports = {
            undoClicked: function(args) {
                drawing.undo();
            },
            redoClicked: function(args) {
                drawing.redo();
            },
            clearClicked: function(args) {
                drawing.clear();
            },
            clearHistoryClicked: function(args) {
                drawing.clearHistory();
            }
        }
    </JavaScript>
    <ClientPanel>
        <NativeViewHost>
            <DockPanel>
                <DrawingPanel ux:Name="DrawingPanel" />
                <StackPanel Height="70" ItemSpacing="10" Alignment="Center" Padding="10" Dock="Bottom" Orientation="Horizontal">
                    <Button Text="Undo" Clicked="{undoClicked}" />
                    <Button Text="Redo" Clicked="{redoClicked}"/>
                    <Button Text="Clear Canvas" Clicked="{clearClicked}"/>
                    <Button Text="Clear History" Clicked="{clearHistoryClicked}"/>
                </StackPanel>
            </DockPanel>
        </NativeViewHost>
    </ClientPanel>
</App>

This PR contains the following:

  • Changelog
  • Documentation
  • Tests

Copy link
Member

@mortend mortend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good as usual and great effort :)

@mortend mortend merged commit c5db1f6 into fuse-open:master May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants