When turning on light mode from dark mode the GoJS buttons don't seem to change

When the theme is changed into lightmode or darkmode gojs nodes colors do not get changed. Is there a way to resolve this?

GoJS has no built-in knowledge of dark mode/light mode, or any other theme. It is up to your application to provide styling changes to your Parts, perhaps via setting some shared model data for binding: GoJS Data Binding -- Northwoods Software

Could you elaborate a bit on setting this shared model data for binding?

It’s going to be application-specific. When you detect a change in light/dark mode, you could then set the shared model data property and your nodes could have a binding that would update their colors, like in the example I sent.

It does change the colors but only after I change to light/dark mode and refresh it

Refreshing shouldn’t be necessary if you executed the change(s) within a transaction.

how should i go about doing that

Simply wrap your model change in a transaction. See the intro page on transactions: GoJS Transactions -- Northwoods Software.

Giving error “Property ‘startTransaction’ does not exist on type ‘typeof UndoManager’”

It’s not a static function.

Normally, calls should be like:

myDiagram.commit(diag => {
    . . .


myDiagram.model.commit(mdl => {
    . . .