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.

Question: onWheel x ref why not both?

See original GitHub issue

I’m working on a small idea and I’m struggling with this little interference.

On my Stage I’m using onWheel={e => configs.handleWheel(e)}, but I’m populating an set of arrows (with map) on a layer using ref={node => execthis(node)}. Using both as this way I do not have access to “getStage()” it does not pass node => to the arrows. React Konva just breaks.

The point is, I do not want to use “state” (react) I want to do “.setPoints()” to the arrows, as it is already working. However, with onWheel it bugs/breaks. Works perfectly without onWheel. But then I lose the scrolling functionality.

Using “.setPoints()” I have less renders and gets more fluid.

What should I do?

Cheers.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
lavrtoncommented, Nov 26, 2018

You may try to update react-konva to the latest version. It has changes in internal updating implementation https://github.com/konvajs/react-konva/issues/271.

Probably you will have the expected result. https://codesandbox.io/s/4jxyywwx4

1reaction
lavrtoncommented, Nov 26, 2018

React will reset reference to null on every update. So I guess in you execthis you will need something like this:

if (!node) {
  return;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

React onwheel not performing existing scrollintoview but ...
I tried both normal calling the function and via arrow at Sect3's onwheel but it still fails. I searched hard enough on react+onwheel+ ......
Read more >
External reference (Xref) will not detach in AutoCAD
Open the External References Palette (XREF). Check in the Tree View to which host reference the reference that should be detached. Open the...
Read more >
Disable force update of properties of Konva nodes · Issue #271
This was referenced on Nov 20, 2018. Unexpected behaviour when dragging group in 16.6.31 #296. Closed. Question: onWheel x ref why not both?...
Read more >
How to fix Autocad Xref problems - YouTube
How to fix Autocad Xref problems - External Reference Issues in AutocadIn this tutorial, I share how to fix external reference problem in ......
Read more >
Unable to detach xref? Watch This..|P3V6 - AutoCAD - YouTube
He understands, xref in Autocad, is not user fri... ... Enjoy, Autocad Xref Problem to Remove Reference | Unable to Detach Xref ?...
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