by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 15:01
    lavrton commented #655
  • 14:58
    lavrton commented #986
  • 14:51
    lavrton commented #990
  • 14:51
    lavrton closed #990
  • 14:49
    lavrton closed #989
  • 14:49

    lavrton on master

    fix event trigger flow. close #… (compare)

  • 14:17
    NicolasRannou commented #990
  • 14:09
    lavrton closed #988
  • 14:09

    lavrton on master

    Fix double `dragend` trigger on… (compare)

  • 14:04
    lavrton commented #987
  • 13:32
    lavrton commented #990
  • 13:19
    NicolasRannou edited #990
  • 13:19
    NicolasRannou edited #990
  • 13:18
    NicolasRannou opened #990
  • 07:33
    ralppppy commented #655
  • 05:30
    Tucaen commented #986
  • 00:39
    jokius opened #989
  • 00:18
    lavrton commented #983
  • Sep 24 22:31
    lavrton commented #986
  • Sep 24 14:44
    Tucaen edited #986
Anton Lavrenov
@lavrton
Depends on the app.
VanquishedWombat
@VanquishedWombat
Would that create a listener per shape in the 'selector' list, or one listener ?
Anton Lavrenov
@lavrton
Per shape.
Underline it should do this:
layer.find(selector).forEach(shape => {
   shape.on(‘click’, func):
})
VanquishedWombat
@VanquishedWombat
I'm looking at a simple game of 100 circles on the page where the user must drag one circle over another until there is only one left. Could be the next angy birds (angry circles, maybe!)
Anton Lavrenov
@lavrton
Btw, join discord: https://discord.gg/8FqZwVT
VanquishedWombat
@VanquishedWombat
Joined
Juan Salvatore
@jnsalvatore_twitter
Hi, in this example when we scale on the y or x-axis we can't get the scale to be negative https://codesandbox.io/s/suspicious-fog-7fmxu In this example the behavior is not the same https://konvajs.org/docs/select_and_transform/Transform_Events.html I see that the scaleY turns negative and the rotation is turned 180º. I'm trying to implement a horizontal and vertical mirror but if I just rotate 180 and make the scale negative the transform breaks. Can I get the same behaviour as in https://konvajs.org/docs/select_and_transform/Transform_Events.html but in react?
Anton Lavrenov
@lavrton
In react you may just keep using scaling.
Juan Salvatore
@jnsalvatore_twitter
but can I get the svg to flip in the x axis or y axis without making the scale negative? because changing the scale to scaleX: scaleX * -1 to flip it breaks the react transform (changes the rotation and position when scaling after the scale was set to a negative number)
Anton Lavrenov
@lavrton
@jnsalvatore_twitter how does it break?
Juan Salvatore
@jnsalvatore_twitter
Screen Shot 2020-09-11 at 16.20.01.png
Screen Shot 2020-09-11 at 16.20.21.png
Screen Shot 2020-09-11 at 16.20.57.png
it flips correctly, but when I try scaling the group after the scale was set to a negative number
it moves to a different position
Anton Lavrenov
@lavrton
I still don’t get it. Can you make a small demo?
Juan Salvatore
@jnsalvatore_twitter
the scaling using the Transform works until I flip the svg by making the scaleY negative and rotating it 180.
Anton Lavrenov
@lavrton
Still hard to say what is going on without demo. How to you change properties of the node?
In this demo you may have any scaling and rotation.
But it keeps scaling inside the store.
Juan Salvatore
@jnsalvatore_twitter
ohh that example fixed my issue, thank you!
the problem was that the boundBoxFunc caused the negative scale that I was setting manually to have unexpected side effects when scaling
Vinay M
@rmdort
@lavrton It seems Text component does not respect ellipsis property anymore
https://codesandbox.io/s/pensive-monad-s8hxr?file=/src/App.js
Anton Lavrenov
@lavrton
@rmdort fixed. Thanks for the report.
Vinay M
@rmdort
Thank you :+1:
Ellipsis has disappeared, but i see it taking up space
When wrap is set to none, the text does not extend
https://codesandbox.io/s/pensive-monad-s8hxr?file=/src/App.js
If you see the demo, i am rendering Hello foo bar. There is enough space for foo, but on f is rendered
Anton Lavrenov
@lavrton
@rmdort just published konva@7.1.3
Take a look.
William R Marchand
@william16_gitlab
@lavrton Moving SVG with a lot of path is really slow. Is that normal? Am I doing something wrong with my SVGs?
Anton Lavrenov
@lavrton
@william16_gitlab how do you draw them. With Konva.Path?
Try to use Konva.Image instead.
Or just cache the path.
It can be slow if they are to complex.
William
@willmtl
@lavrton ya I draw them with konva.path because I allow people to change the color. How would you cache the path?
Anton Lavrenov
@lavrton
The same way as any other shape.
William
@willmtl
I see it in the doc but I have no idea in the context of react konva
Any exemple online?
William
@willmtl
Can you cache a group and their childs?
LoukilGhassen
@LoukilGhassen
is there a way to implement onWrap event for text
Anton Lavrenov
@lavrton
@LoukilGhassen why do you need it?
Cristian Razvan
@CRGavrila
Hy, (using Konva.Path) i have an iconPath but the svg has a viewBox="0 0 480 480" and I can't figure out how to change width/height. Any suggestions? Thanks!
Tulsani
@Tulsani

Hey,
I was trying to upload a stage to an s3 bucket on click of a button,
I was trying to use stage.toDataURL() , although this allows me to download the image on to local file as png easily but since it is a base64 string for the image the out is not able to load on S3, (my s3 uploader is working fine while uploading an image file from local using <input type='file'>).

Is there a way to convert the base64 to jpeg and upload to S3?

Anton Lavrenov
@lavrton
@Tulsani you can convert it into blob.
It is like a file.
Tulsani
@Tulsani
@lavrton Thanks a lot worked for me !!