Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

drr: Flexible positioning of the rotation anchor (top, left, right, bottom) #1216

Open
1 task done
rfuehrer opened this issue Jun 28, 2021 · 4 comments
Open
1 task done
Labels
drag-resize-rotate enhancement New feature or request good first issue Good for newcomers

Comments

@rfuehrer
Copy link

Affected part of DeckDeckGo

  • Web Components

Feature Description

Is it possible that the position of the anchor can be changed? An option like rotation-ancohr:top|left|right|bottom (or rotation-ancohr-position) offers more flexibility in other usage scenarios.

Or is that already possible today through existing CSS properties?

Use Case

I use drr for a project where the user has to find out the alignment of different objects to each other. The anchor makes it obvious to the user how the element must be aligned in the superordinate context (anchor always upwards ;) ).

If the anchor positions of the displayed elements can be changed for each deckgo-drr object, the alignment of the elements in the overall context is no longer necessarily obvious.

@peterpeterparker
Copy link
Contributor

Thank you for the feature request.

What do you mean with "the position of the anchor can be changed"?

Do you mean like being able to select which anchor is active or not? Like saying "the top left corner can be used to rotate the element but no other corner" or something else?

@rfuehrer
Copy link
Author

rfuehrer commented Jun 28, 2021

no, I mean the rotation anchor/handle, which is always shown in the middle of the upper line (marked in red).

image

Actually my intention is to change the orientation of an embedded image to the touch point for rotations.

This can be achieved by rotating the image or moving the rotation handle to the left, right or bottom border of this object.

The intention is not to reveal the natural orientation of the image through the handle :)

@peterpeterparker
Copy link
Contributor

peterpeterparker commented Jun 28, 2021

Thank you for the explanation, all clear.

You would like to add new property (@Prop()) which should be use to display the "rotate" anchor either at the top, right (or end), bottom or left (or start).

The property should probably add a class to the shadowed dom and, the div.rotate should then be modified in the css accordingly.

That should do the trick.

Currently, we do not have such requirement and have also other shorten goals, therefore I won't personally implement it, at least within next weeks.

That being said, I am not against it. If you can provide a PR, happy to review it.

@peterpeterparker peterpeterparker added the good first issue Good for newcomers label Jun 28, 2021
@rfuehrer
Copy link
Author

Ii'll be happy to try my hand at it. I have a project right now in which i'm using the function for the first time - I hope it will be accepted by the client, then I can also invest more time here accordingly. The decisive factor is the feedback from the client.

As soon as it becomes more concrete, i will gladly show the usecase live.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
drag-resize-rotate enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants