-
Notifications
You must be signed in to change notification settings - Fork 184
Plot.image rotate option #1084
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
Plot.image rotate option #1084
Conversation
.attr( | ||
"transform-origin", | ||
R || this.rotate | ||
? X && Y | ||
? (i) => `${X[i]}px ${Y[i]}px` | ||
: X | ||
? (i) => `${X[i]}px ${cy}px` | ||
: Y | ||
? (i) => `${cx}px ${Y[i]}px` | ||
: `${cx}px ${cy}px` | ||
: null | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunate complexity… am I missing a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you set use transform-origin="center" instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and it doesn’t work.
It looks great to me, thanks for the quick response! Though I have to say I don't understand the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to combine the x, y, and transform-origin attributes into a single transform attribute, similar to what we do for dot and vector. Also this could use the template
helper I created for #1189.
closes #1083
c860376
to
b259e36
Compare
This looks useful. |
superseded by #1426 |
Demo: https://observablehq.com/@observablehq/plot-image-rotate-1084
closes #1083
todo: