Questions tagged [konva]

Konva is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.

Konva is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.

270 questions
0
votes
1 answer

How to redact/blur parts of an image using javascript (Konva)?

I'm trying to create an image editor that can mask personal identifiable information. We're using konva right now to add black Rect shapes over images, but we would love to use the blur or even pixelate feature. Im not sure I'm going about this…
Orry
  • 257
  • 1
  • 3
  • 10
0
votes
1 answer

Konva - select and save shapes

I'm going to use konva.js to draw and select shapes in a canvas, but I'd like to save into mysql database the type of shapes selected (square1, rectangle2, etc). How can I do it? Thanks
0
votes
1 answer

How to make a connector between two stars move when one of a star drag in react js?

Yo guys, I cannot figure how to make a connected line between two circles being dragged along with one of a circle. I guess one way is to update the actual coordinate of a circle being dragged, but I am struggling to implement that as well. Can…
BOB
  • 1
  • 3
0
votes
1 answer

Resize Text within Group

I have a case where I would like to resize the Group using middle-right and middle-left anchors but the result is not what we are actually expecting. If the group is resized using middle-right and middle-left, it should adjust the text's width and…
0
votes
1 answer

How do you detach the konva transformer from an image on "mouseout" event?

I am trying to figure out a way to detach the Konva.js transformer from my image. I have successfully created and attached the transformer to the images using a "mouseover" event, but I can't figure out how to detach the transformer with my…
dcurtains
  • 3
  • 1
0
votes
1 answer

image is not being added on the canvas through socket.io?

Hi im building a collaborative whiteboard app with Konva. I want to drag images on the canvas and also make it displayed to the other clients connected to the app. I've tried to do some things but its not really working.. Here is what im trying to…
dvid vid
  • 31
  • 10
0
votes
1 answer

Moving a Polygon with react-kova - update the position

I use Konva embedded in React. I try to move a polygon created using a finished Line. The corner points are draggable. The approach supposed to be simple. You use the points coordinates and add the relative position. My problem is that the corner…
KLE
  • 3
  • 1
0
votes
1 answer

How to animate svg elements in a for loop with vue?

working with vue-konva (svg based canvas library) right now. I'm trying to animate all shapes which are defined by a v-loop. While trying to use the Konva Animation library functions, I'm getting "Cannot read property 'getNode' of undefined" error.…
0
votes
1 answer

Konva zoom fill to content on the stage

Hi I'm very lost on how to accomplish this. I'm basically trying to zoom into some content when it is added to the stage. I have one stage and one layer. Some shapes are added to the layer, let's say some Lines are added with some predefined points…
Pablo Corso
  • 119
  • 2
  • 6
0
votes
0 answers

Cloning group in konvajs

I want to clone a group from one layer to another layer. But when I try to get the parent layer of the newly created (cloned) group, no parent is set. let group1 =…
0
votes
1 answer

konva 2D drawing - can i send another variable in mouse down event?

I want to send another value in mouse event, because my handleMouseDown function is in another file. stage.on('mousedown', handleMouseDown(evt, stage)) but i got error: - Argument of type 'void' is not assignable to parameter of type…
LukasGur
  • 311
  • 4
  • 14
0
votes
1 answer

Is it possible to rotate a group after we drag drop the certain object onto them in konvajs?

I'm trying to animate the weighing machine i.e. if the user drag and drops the balls on the weights of the machine, the machine should move according to the weights of the balls afterward. The weighing machine would not be animated from the start…
munim
  • 33
  • 10
0
votes
1 answer

Konva animation and drag'n'drop are super slow on my Xiaomi device

I have an app written with Konva.js, and it works really smoothly on both my 13-year-old PC and my wife's iPhone XR - it's just perfect. But whenever I run it on my Xiaomi Redmi 9 Pro and also my older one, Xiaomi Redmi Note 4X in many different…
Mikhail Dudin
  • 459
  • 5
  • 15
0
votes
1 answer

Konva haveIntersection js

i´m newbie konvas libray user, I try made a simple game, i need detect when dragout the box from the shape and show alert "louser", the problem is the shapes irregular because the functio for detection event work good a rectangle shapes, but in…
0
votes
1 answer

React-konva mobile zoom and draggable image

I am using Konva.js to build a canvas app. This app allows user to drag an image and zoom at any point. This works perfectly on Desktop. However, I like this app to be responsive for mobile devices. The problem here is canvas zoom and image drag…
hcacode
  • 75
  • 1
  • 9