You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I've been messing with the CSS for rotating the pedals for a bit I have a working version. I cannot clone the repo due to disk space so I thought on adding the details here.
My current approach has only one downside, when the item is being dragged it will be shown as non-rotated. Once the drag finish the item will be placed in the right position, but you can't visually target the right place as the pedal will be drawn in a different position. This is caused by the drag library which uses the transform property, which overrides the rotation that we have put in place.
Since I can't clone this repo I cannot debug/change the script that controls the draggable element, so it's not clear to me if this can be solved by a simple config when setting up the drag handler.
Another approach would be introduce a wrapper div so that the artwork and the controls sit in a separate div than the one being dragged, however this approach requires being able to run the code locally.
Maybe anyone with access to the code locally can pick from where I left. Please find below the CSS rules to fix boundary when rotating the pedals. Anyone wants to continue on this?, more than glad if you submit the PR on your name!
Fix boundaries when rotating pedals:
[1] Add the transition effect to the item, it we will rotate the element itself so the boundary gets rotated accordingly.
Hi all, I've been messing with the CSS for rotating the pedals for a bit I have a working version. I cannot clone the repo due to disk space so I thought on adding the details here.
My current approach has only one downside, when the item is being dragged it will be shown as non-rotated. Once the drag finish the item will be placed in the right position, but you can't visually target the right place as the pedal will be drawn in a different position. This is caused by the drag library which uses the
transform
property, which overrides the rotation that we have put in place.Since I can't clone this repo I cannot debug/change the script that controls the draggable element, so it's not clear to me if this can be solved by a simple config when setting up the drag handler.
Another approach would be introduce a wrapper div so that the artwork and the controls sit in a separate div than the one being dragged, however this approach requires being able to run the code locally.
Maybe anyone with access to the code locally can pick from where I left. Please find below the CSS rules to fix boundary when rotating the pedals. Anyone wants to continue on this?, more than glad if you submit the PR on your name!
Fix boundaries when rotating pedals:
[1] Add the transition effect to the item, it we will rotate the element itself so the boundary gets rotated accordingly.
[2] Problem 1**: the item needs to be draggable, so remove the animation effect
[3] Allow items to be rotated:
[4] Correct the action labels placements when rotated:
[5] Remove the transition effect to the artwork
.item .artwork { background-repeat: no-repeat; background-position: center; background-size: 100% 100%; z-index: 1; position: relative; - transition: all 0.4s; -webkit-filter: drop-shadow(3px 5px 7px rgba(0, 0, 0, 0.34)); filter: drop-shadow(3px 5px 7px rgba(0, 0, 0, 0.34)); }
[6] Remove these unused styles
The text was updated successfully, but these errors were encountered: