Can we remove token once path animation is completed

Hi, I have implemented path animation, I also have added stop button
if user wants to stop the path animation, but on stopping the animation, the token is not getting removed.

I have used below code to add token:

diagram.model.addNodeData({ category: 'token', at: '-1', color: red, key: 'animation-token' });

and I was trying to remove token using below code:

diagram.model.removeNodeData({ key: 'animation-token' });

Can you please guide me where i am going wrong.

Please read GoJS Using Models -- Northwoods Software for an explanation.

model.removeNodeData(model.findNodeDataForKey('animation-token'))

Ohh Thanks Walter for Swift Response…
It is working now…