question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rotation of multiple stickers

See original GitHub issue

I’ve been trying to figure out how to use konva to put sitckers on an image and have them stick properly through rotation, scale, and moving. I’ve got the last two done but rotation is throwing me in circles 😉

I clcik my rotation button then it rotates the main image and the sticker…am I missing several things?

So far I’m doing this:

  rotate = () => {
    if (this.mounted) {
      this.setState(
        {
          rotation: this.state.rotation + 90,
          konvaImageList: this.state.konvaImageList.map(konvaImage => {
            return {
              ...konvaImage,
              rotation: konvaImage.rotation + 90,
              x: konvaImage.x,
              y: konvaImage.y
            };
          })
        },
        () => console.log(this.state.konvaImageList, "konvaImageList")
      );
    }
  };

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lavrtoncommented, Jun 9, 2019

I think the simplest way is to move all of them into the group, and then just rotate the group.

0reactions
developdeezcommented, Jun 9, 2019

It’s rotating in it’s own square I’d say. Just courious how to associate it with the base pic

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decal Stickers Multiple Sizes Rotation & Alignment Green Red ...
Decal Stickers Multiple Sizes Rotation & Alignment Green Red Auto Car Repair Industrial Vinyl Safety Sign Label Automotive 24x18Inches ; Sold by. Fastasticdeal....
Read more >
How to handle stickers with resize and rotate functionality?
I am currently developing an application which will allow user to add stickers (hat, hairs, spectacles etc) on image. User can resize that...
Read more >
Flipping and rotating elements - Canva Help Center
Select the element that you want to flip or rotate. To flip it, select Flip from the editor toolbar. To rotate it, drag...
Read more >
Resize, rotate, and flip objects in Pages on Mac - Apple Support
Click the object to select it, or select multiple objects. In the Format sidebar, click the Arrange tab. Drag the Rotate wheel, or...
Read more >
Stop Wasting Sticker Paper! NEW & IMPROVED Process ...
I'm so glad I discovered this new method for cutting my sticker sheets ... Tip for Cutting Multiple Sheets 22:32 Farewell #tutorial #howto ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found