-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Layout Engine] Alignment: Snap to Grid #23052
Comments
Original comment by @monfera: I reclassified it from small to large as the snapping is somewhat involved to get right, even though we now have some of the machinery involved, and we have snap lines already (the magenta lines). Snapping is planned to have these features: Translation (drag&drop) snapping:
Resize snapping:
Rotation snapping:
|
Original comment by @monfera: @alexfrancoeur I just took a look at Google Slides, and to clarify, the rotation is free range without a modifier key, but it still snaps to 45 degree increments when one is nearby (in a few degrees' distance). So, while it seemed that way when initially reading LINK REDACTED it is probably just a misunderstanding due to probably how I worded things. So, in conclusion, all tested comparable software (Adobe Illustrator, Sketch, Google Slides and iirc PowerPoint) rotates freely without a modifier key except the proximity snapping at 45 degree increments, and this is what we do now as LINK REDACTED is merged. Coming up: In mainstream software, using a modifier key enables discrete rotation that you describe, eg. Google Slides at 15 degree intervals, which we're planning to add based on your feedback (I'll add it to the checklist above). We may add another modifier key which would disable the current proximity snapping, so a rotation of eg. 1 degree would be possible. With this, the basic behavior is free range rotation with 45deg snapping, and with modifier keys, the user will be able to relax (inhibit snapping) or constrain (discrete angles at a 15-degree cadence). This plus showing the angle (adding it to the list too in a moment). @cqliu1 I have some self-doubt about the snapping tolerance or might have misunderstood and gone overboard. Upon more use and also playing with Google Slides etc the +/-5 degree feels too large, even though it felt "right" on a quick initial try. So I'm planning to make it a range of 5 degrees ie. +/- 2.5 degrees which is about what Google Slides does, and more than what we had when you tested before your comment. Adobe Illustrator is even less pronounced, in our usual rectangle size, the effect is +/- 0.8 (!) degrees, but for a web based app we should err toward Google Slides (high-paying Ai - ie. pro - users may be more meticulous and feature-aware than our users among who casual users, or users with lesser quality pointer devices may be a higher proportion). @cqliu1 @alexfrancoeur having said this, it's interesting what Ai does - the farther away you're from the center of rotation with your mouse, the smaller the snap suck-in zone. It's the most scalable behavior because:
I wanted to mention a super subtle effect in Ai that we don't have yet, but it's noticeable once you rotate an element with the mouse cursor really close to the rotation origin. We (and the not too refined Google Slides) currently just set the angle so that the element direction complies with the pointer. With a rotation a few pixels away from the center, it results in wild, immediate orientation jumps, the extreme of which is eg. from 0 to 180deg. Meanwhile, Ai has an incredibly fast tweening (a few 1/60sec frames) that is still clearly nicer. Adding temporal behavior (tweening) is something for the future though. cc @snide |
Original comment by @monfera: @alexfrancoeur as you asked for showing the rotation degree, I assume we want width/height and maybe position for resizing, and position for drag and drop? And ofc eventually showing distance from other objects, or from ones that are linked with the magenta snap line as Sketch does nicely :-) |
Original comment by @monfera: @rayafratkina I might need a Microsoft PowerPoint license to include it in our watch too |
Original comment by @alexfrancoeur: @monfera thanks for the detailed info! Your proposal overall sounds good to me. A few questions / comments around some of the specifics.
Agreed, 5 degrees seemed a bit much to me
++ I really like this experience
I'd be interested in seeing a gif of this, any chance you could share?
I agree that Sketch does this nicely and would like to see these labels where appropriate. What do you think @rashidkpc?
IT should be able to handle that, we have a bunch lying around |
Original comment by @monfera: @alexfrancoeur here's a gif with the effect:
To me looks sensible because snapping is a function of a pixel distance traveled with the mouse, and not angle. Consider how much the mouse needs to travel if the user rotates far away from the shape center, even if we use a smaller value eg. +/-2.5deg. Also, users can this way tweak snap distance, yet get a reassuring snap even with fine, fractional degrees. |
Original comment by @alexfrancoeur: Interesting, I like this concept @monfera! |
I'm going to close this as we now have snapping/alignment of elements. |
Original comment by @alexfrancoeur:
Right now we only have a graphical grid in Canvas accessible by the keyboard shortcut
alt+G
. In order to provide the a very basic alignment experience, we should add support for snap to grid. Most presentation have this feature but it is normally trumped by Snap to Guides. I believe Snap to Grid will likely be prerequisite for Snap to Guides (LINK REDACTED).The text was updated successfully, but these errors were encountered: