konvajs-reactjs

What is the best way to drag a transformer by dragging from empty areas in Konvajs?

江枫思渺然 提交于 2021-02-10 00:28:22
问题 I'm currently following this guide to select shapes in the stage and put them inside a Transformer. If possible, I'd like to drag an entire Transformer with all of its content without touching any of the shapes inside. For example, I have two lines that are far from each other. Both of them are nodes inside a Transformer and can be dragged as long as I click one of those 2 lines. However, if I tried to drag from any of the empty area inside the Transformer nothing would happen (or the

What is the best way to drag a transformer by dragging from empty areas in Konvajs?

耗尽温柔 提交于 2021-02-10 00:12:45
问题 I'm currently following this guide to select shapes in the stage and put them inside a Transformer. If possible, I'd like to drag an entire Transformer with all of its content without touching any of the shapes inside. For example, I have two lines that are far from each other. Both of them are nodes inside a Transformer and can be dragged as long as I click one of those 2 lines. However, if I tried to drag from any of the empty area inside the Transformer nothing would happen (or the

What is the best way to drag a transformer by dragging from empty areas in Konvajs?

微笑、不失礼 提交于 2021-02-10 00:11:21
问题 I'm currently following this guide to select shapes in the stage and put them inside a Transformer. If possible, I'd like to drag an entire Transformer with all of its content without touching any of the shapes inside. For example, I have two lines that are far from each other. Both of them are nodes inside a Transformer and can be dragged as long as I click one of those 2 lines. However, if I tried to drag from any of the empty area inside the Transformer nothing would happen (or the

What is the best way to drag a transformer by dragging from empty areas in Konvajs?

若如初见. 提交于 2021-02-10 00:05:20
问题 I'm currently following this guide to select shapes in the stage and put them inside a Transformer. If possible, I'd like to drag an entire Transformer with all of its content without touching any of the shapes inside. For example, I have two lines that are far from each other. Both of them are nodes inside a Transformer and can be dragged as long as I click one of those 2 lines. However, if I tried to drag from any of the empty area inside the Transformer nothing would happen (or the

How can I get the intersection of three shapes colliding and delete the parts that are not colliding in KonvaJs?

雨燕双飞 提交于 2020-12-06 05:31:29
问题 If I am given 3 circles and they are positioned as the primary colors circles (3 circles intersecting each other), is there a function that might help me to delete the parts that are not colliding with anything and just keep the intersecting parts? Another example could be drawing three lines in such a way that it forms a triangle. By deleting the parts that are not colliding, we would end up with 3 points (at least visually, not sure if I end up with 3 in total or 6 from stacking up), which

Konvajs: How to change position of group of texts

我是研究僧i 提交于 2020-04-30 06:25:04
问题 I'm using Konvajs, I have group of texts, and I want don't allow drag group outside of the canvas, I'm tried solved that using dragBoundFunc, but that don't help me, now I just try change group position during dragmove, but setPosition, setAbsloutePosition, nothing allow me to change group position stage.on('dragmove', (e) => stageOnDragMove(e, layer)); const stageOnDragMove = (e: Konva.KonvaEventObject<any>, layer: Konva.Layer) => { const selectionGroup = layer.findOne('#selection-group');