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

Star example doesn't work as expected #7

Open
coccor opened this issue Feb 19, 2018 · 2 comments
Open

Star example doesn't work as expected #7

coccor opened this issue Feb 19, 2018 · 2 comments

Comments

@coccor
Copy link

coccor commented Feb 19, 2018

In the star example you have 2 methods in the source code that seems to not be used handleDragstart and handleDragend.

I tried to fix it by using the dragstart and dragend events but I get an error at ngComponent.config.next

Do you have any idea how to fix it and make it work like in the Konva docs - Elastic_Stars ?

@mush20
Copy link

mush20 commented Mar 1, 2018

It works for me, but the scaling and easing don't seem to be working.

@niuba
Copy link

niuba commented Dec 24, 2018

just add
...ngComponent.getConfig(),
in

    ngComponent.config.next({
      shadowOffsetX: 15,
      shadowOffsetY: 15,
      scaleX: ngComponent.getConfig().startScale * 1.2,
      scaleY: ngComponent.getConfig().startScale * 1.2,
    });

like this


    ngComponent.config.next({
      ...ngComponent.getConfig(),
      shadowOffsetX: 15,
      shadowOffsetY: 15,
      scaleX: ngComponent.getConfig().startScale * 1.2,
      scaleY: ngComponent.getConfig().startScale * 1.2,
    });

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

3 participants