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

Trigger Redraw of External Widget no more working in master branch #381

Open
kdschmidt1 opened this issue Nov 3, 2024 · 14 comments
Open

Comments

@kdschmidt1
Copy link
Contributor

Trigger Redraw of External Widget results in "react-dom.development.js:4312 Uncaught TypeError: setUpdateCount is not a function"

triggerRedraw: () => {

@quantenschaum
Copy link
Contributor

Maybe 3422450 seems to break it again or something else is broken.

Map overlay widgets get only drawn once but are not updated.

Does the widget code need to be updated?

@quantenschaum
Copy link
Contributor

quantenschaum commented Dec 29, 2024

git bisect yields that 5934c79 is the breaking change.

@wellenvogel
Copy link
Owner

Can you describe a bit more in detail what went wrong? Is triggerRedraw not working? Or is there no redraw on a store item change?

@quantenschaum
Copy link
Contributor

quantenschaum commented Dec 30, 2024

Uhm? It was working before 5934c79. The SailInstrument chart overlay is only drawn once and then it does not get updated. If the widget is in the widget areas it works fine, only the chart overlay does not update.

renderCanvas is called regularly, but it does not update on the screen.

There are no error messages in the JS console.

@wellenvogel
Copy link
Owner

I cannot reproduce your problem. I have a simple test widget that draws a rotating cross and that is working without any problems.
To support you I would need some code that I can use for testing.

@quantenschaum
Copy link
Contributor

quantenschaum commented Jan 6, 2025

Interesting. You can try the https://github.com/quantenschaum/Sail_Instrument plugin. Add it as a map overlay. The widget is updated, but the overlay is not.

@quantenschaum
Copy link
Contributor

@kdschmidt1 do you have this problem, too?

@quantenschaum
Copy link
Contributor

quantenschaum commented Jan 6, 2025

Maybe something went wrong during merging on my side, I'll check that. - No, has nothing to do with merging.

@kdschmidt1
Copy link
Contributor Author

I can confirm the error with the actual avnav master-branch and the original sailinstrument-plugin https://github.com/kdschmidt1/Sail_Instrument/releases/tag/20240731.
retesting with the latest avnav release branch https://github.com/wellenvogel/avnav/tree/release-20240616 is running properly

@quantenschaum
Copy link
Contributor

5934c79 causes the problem, but I do not understand why.

@wellenvogel
Copy link
Owner

I tested with your proposed SI release and the SailInstrumentOverlay. But this draws nothing except the compass ring as it has no HDT available (although headingTrue is there). At the end there is no sail_instrument data at all - but the log gets filled with errors:
user-Sail_Instrument-ERROR-user-Sail_Instrument:setting invalid path gps.sail_instrument.HDT
So I don't think that there is any issue at the widget side.

@wellenvogel
Copy link
Owner

Ok, seems to be a problem on my test setup with multiple instances...

@wellenvogel
Copy link
Owner

Ok, after correcting my test setup I can reproduce the problem. Sometimes react18 has some strange effects...

@quantenschaum
Copy link
Contributor

It's working again!

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