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

Selection/move tool #170

Closed
5 tasks done
Luciogi opened this issue Dec 26, 2022 · 9 comments · Fixed by #937
Closed
5 tasks done

Selection/move tool #170

Luciogi opened this issue Dec 26, 2022 · 9 comments · Fixed by #937
Labels
enhancement New feature or request

Comments

@Luciogi
Copy link

Luciogi commented Dec 26, 2022

Is your feature request related to a problem? Please describe.
There is no option to move content of page

Describe the solution you'd like
Add option in tool bar for selection of content on page

Describe alternatives you've considered
I have to remove content and write again

Device (please complete the following information):

  • Device: Redmi 9T
  • OS: Android 12L
  • Version: v0.4.9 F-Droid (409)

Additional context
none

Features

  • Selecting strokes
  • Selecting images
  • Duplicate selection
  • Delete selection
  • Change color of selected strokes
@Luciogi Luciogi added the enhancement New feature or request label Dec 26, 2022
@adil192 adil192 changed the title Feature request for Selection Selection/move tool Dec 26, 2022
@NicholasLam12
Copy link

I think it would also be useful if the selection/move tool is bundled with a copy function so that if you for some reason need two identical diagrams you wouldn't need to redraw the whole diagram again

@adil192
Copy link
Member

adil192 commented Feb 1, 2023

v0.8.0 has a new select tool. It can only move strokes around at the moment but this will be extended in future releases :)

@Polux49
Copy link
Contributor

Polux49 commented Feb 22, 2023

+1 for the duplicate or delete.
The following actions on the content of a selected area would also be very useful in my opinion:

  • By means of the toolbar buttons, change some properties (not only color, but also width and pen style) simultaneously for all the lines in the selected area.
  • Stretch it (suggestion: after a long press on the selected area, a box containing it would be convenient for stretching).

In addition, a tool for selecting the whole page in one click would be nice, too.

My guess is that you already planned all this, but in case of... :-)

adil192 added a commit that referenced this issue Mar 4, 2023
adil192 added a commit that referenced this issue Mar 8, 2023
@adil192 adil192 added this to the v1.0.0 Stable release milestone Mar 21, 2023
@WasteOfO2
Copy link

WasteOfO2 commented Mar 26, 2023

You can technically move ur selection to the edges and make it disappear, but i am sure this is more likely to be a bug more than a feature :P

This is almost certainly not what u could be asking abt, but hopefully this can be used as a stopgap solution for deletion of selected contents

screen-20230326-220809.mp4

@KainAlive
Copy link

In other note-taking apps (GoodNotes, for example), it's possible to select a line by selecting part of it with the selection tool. In Saber, you have to select the whole stroke to move it, which is quite difficult, especially when strokes are close together. It would be nice to be able to select just part of the stroke.

@adil192
Copy link
Member

adil192 commented Jun 4, 2023

you have to select the whole stroke to move it

@KainAlive The current behaviour is to select a stroke if most (70%) of the stroke is in the selection area. This handles cases where strokes are close together quite gracefully in my testing, such as avoiding the tail of the letter "y" in the line above when selecting something in the line below it.

https://github.com/adil192/saber/blob/cf91edcbb91869d3b6cbb9081788631dbdc63db3/lib/components/canvas/tools/select.dart#L13-L15

If you'd like this percentage to be configurable by the user (e.g. 0-1% to select any stroke that touches the selection area), please file a feature request issue.

@scholzri
Copy link

scholzri commented Jun 18, 2023

I would like to add the ability to not only copy/duplicate the selected content but also to cut it and paste it elsewhere. In addition to the standard dragging around of the selection, this would enable us to move the selection over longer distances (for example a few pages downwards) more easily. Also it would be great, to copy/cut the selection between different notes.

@AraxTheCoder
Copy link
Contributor

AraxTheCoder commented Sep 18, 2023

@adil192 should the duplication, deletion, scaling and cutting menu be accessible by long pressing/right clicking the selection similar to good notes (also in design) or more like the pen tool where the options get shown in the toolbar when the selection tool is selected?

https://support.goodnotes.com/hc/en-us/articles/7353711532815-Copying-and-pasting-Goodnotes-content

adil192 added a commit that referenced this issue Sep 22, 2023
* feat: change color of selected strokes

This adds the ability to change the color of the selected strokes, as requested in #170.
_canvas_painter is changed so that the user gets feedback on the changed color while keeping the selection feedback.

* fix: added history to color change of selection

* fix: added visual highlighter selection and color change feedback

* fix: added autosaveAfterDelay after changing selection color

* fix: assert that the length of colorChange is the same as strokes

* fix: check if select.doneSelecting before changing colors of strokes

* fix: refactor to use reduce call instead of forEach

* feat: change color of selected strokes

This adds the ability to change the color of the selected strokes, as requested in #170.
_canvas_painter is changed so that the user gets feedback on the changed color while keeping the selection feedback.

* fix: added history to color change of selection

* fix: added visual highlighter selection and color change feedback

* fix: added autosaveAfterDelay after changing selection color

* fix: assert that the length of colorChange is the same as strokes

* fix: check if select.doneSelecting before changing colors of strokes

* fix: refactor to use reduce call instead of forEach

* fix: changed selection feedback color to primaryColor

* fix: colorChange length matches strokes length assertion

Co-authored-by: Adil Hanney <adilhanney@disroot.org>

* fix: add doneSelecting check inside getDominantStrokeColor

Co-authored-by: Adil Hanney <adilhanney@disroot.org>

* chore: minor formatting fixes

* fix: improve wording of assert

* fix: don't rely on dragPageIndex when changing selection color

* fix: fix my refactor

* ref: short circuit if no strokes selected

---------

Co-authored-by: Adil Hanney <adilhanney@disroot.org>
Co-authored-by: Adil Hanney <adilh+github@orchid.anonaddy.com>
@adil192
Copy link
Member

adil192 commented Sep 22, 2023

more like the pen tool where the options get shown in the toolbar when the selection tool is selected

@AraxTheCoder I think this would be more consistent with the rest of the app

@adil192 adil192 linked a pull request Oct 4, 2023 that will close this issue
@adil192 adil192 unpinned this issue Nov 26, 2023
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

Successfully merging a pull request may close this issue.

8 participants