Skip to content

[Question] is there any option to get x,y position when we click on the image in particular area ? #86

Answered by hm21
santoshgistto asked this question in Q&A
Discussion options

You must be logged in to vote

In the editor version >= 4.0.0 you can now get the x,y position when you create a custom widget like below:

configs: ProImageEditorConfigs(
  customWidgets: ImageEditorCustomWidgets(
    mainEditor: CustomWidgetsMainEditor(
      bodyItems: (editor, rebuildStream) {
        return [
          ReactiveCustomWidget(
            stream: rebuildStream,
            builder: (_) {
              return Listener(
                behavior: HitTestBehavior.translucent,
                onPointerDown: (details) {
                  print({
                    'global': details.position,
                    'local': details.localPosition,
                  });
                },
              );
      …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@santoshgistto
Comment options

@hm21
Comment options

hm21 Jun 18, 2024
Maintainer

Answer selected by hm21
@santoshgistto
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #85 on June 14, 2024 07:00.