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

Multiple transformations #7

Closed
dmi3kno opened this issue Feb 25, 2020 · 1 comment
Closed

Multiple transformations #7

dmi3kno opened this issue Feb 25, 2020 · 1 comment

Comments

@dmi3kno
Copy link
Contributor

dmi3kno commented Feb 25, 2020

I am looking at the Transformations vignette and I don't actually see multiple transformations applied, as the code suggests:

heart_shadow <- stag$g(
  fill = 'grey',
  svg_prop$transform$rotate(-10, 50, 100),
  svg_prop$transform$translate(-36, 45.5),
  svg_prop$transform$skewX(40),
  svg_prop$transform$scale(1, 0.5),
  heart_shape
)

This should have translated to

  <g fill="grey" transform="rotate(-10 50 100) translate(-36 45.5) skewX(40) scale(1 0.5)">

heart_3

While it only shows

  <g fill="grey" transform="scale(1 0.5)">

heart_1

It is actually pretty useful feature to be able to combine transforms and I would like to use it in other stags as well, such as in $use

@coolbutuseless
Copy link
Owner

Definite bug.

This used to work as documented. Will investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants