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

Add an option to allow users to enable showing the layer immediately after adding a sticker #44

Closed
thanglq1 opened this issue May 11, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@thanglq1
Copy link

Platforms

Android, iOS

Description

Hi @hm21. Please help add an option to allow users to enable showing the layer immediately after adding a sticker or emoji.

Why

No response

@thanglq1 thanglq1 added the enhancement New feature or request label May 11, 2024
@hm21
Copy link
Owner

hm21 commented May 11, 2024

With “layer” you mean the selection border around the “layer” with the interaction buttons, right?
If yes, I added this feature in version 2.7.8. You can enable/ disable this option like below:

 configs: const ProImageEditorConfigs(
        layerInteraction: LayerInteraction(
          selectable: LayerInteractionSelectable.enabled,
          initialSelected: true, /// new option
        ),
),

hm21 added a commit that referenced this issue May 11, 2024
… issue #44

This commit introduces the ability to select layers immediately after they are created, enhancing user interaction within the editor. Changes were made across multiple modules including the main editor and layer interaction configurations to support this feature. Also, updates are included in the CHANGELOG.md and pubspec.yaml to reflect the new functionality.
@thanglq1
Copy link
Author

With “layer” you mean the selection border around the “layer” with the interaction buttons, right? If yes, I added this feature in version 2.7.8. You can enable/ disable this option like below:

 configs: const ProImageEditorConfigs(
        layerInteraction: LayerInteraction(
          selectable: LayerInteractionSelectable.enabled,
          initialSelected: true, /// new option
        ),
),

Yes, thank you. I have just checked. Its working now. Could you help add more option to custom layer such as border width, border color, close button, rotation button.

@hm21
Copy link
Owner

hm21 commented May 11, 2024

Actually, I already added options to configure the editor like below:

      configs: const ProImageEditorConfigs(
        layerInteraction: LayerInteraction(
          selectable: LayerInteractionSelectable.enabled,
          initialSelected: true,
        ),
        imageEditorTheme: ImageEditorTheme(
          layerInteraction: ThemeLayerInteraction(
            buttonRadius: 10,
            strokeWidth: 1.2,
            borderElementWidth: 7,
            borderElementSpace: 5,
            borderColor: Colors.blue,
            removeCursor: SystemMouseCursors.click,
            rotateScaleCursor: SystemMouseCursors.click,
            editCursor: SystemMouseCursors.click,
            hoverCursor: SystemMouseCursors.move,
            borderStyle: LayerInteractionBorderStyle.solid,
            showTooltips: false,
          ),
        ),
        icons: ImageEditorIcons(
          layerInteraction: IconsLayerInteraction(
            remove: Icons.clear,
            edit: Icons.edit_outlined,
            rotateScale: Icons.sync,
          ),
        ),
        i18n: I18n(
          layerInteraction: I18nLayerInteraction(
            remove: 'Remove',
            edit: 'Edit',
            rotateScale: 'Rotate and Scale',
          ),
        ),
      ),

@thanglq1
Copy link
Author

Yes, but can not custom close and rotate button.

@hm21
Copy link
Owner

hm21 commented May 11, 2024

Do you want to change the background and icon color of the button or create a complete custom button?

@thanglq1
Copy link
Author

Currently I just want to change background and icon color but I think we should support create a complete custom as well.

@hm21
Copy link
Owner

hm21 commented May 11, 2024

Okay, after I release the new crop-rotate-editor I will add some options to replace and style the buttons or if you have time, you can create a pull request with the required options I will merge it then.

@thanglq1
Copy link
Author

Sorry, for Flutter, I'm a newbie. I can't create a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants