Skip to content
Menu
Wiquid Digital Tools for Education
  • Home
  • Service offer
    • Service offer
    • Consulting
    • Digital correction
    • Wiquid – Compagnon digital
  • Digital tool index
    • PCI Catalog by Wiquid
    • PCI GEOGEBRA download
    • WonderChoice workshop
  • PCI GEOGEBRA
Wiquid Digital Tools for Education

Building a ready made solution for Undo-Redo function for Konva.js

Posted on November 24, 2022

Here is the situation :

If you are using Konvajs, a solution to build a undo-redo feature is to manage the stage state using JSON. But if you have a complex app, and many listeners. No simple solution.

The objective is to build a function that you can add to your code to include an action in the undo-redo logic.

In this example, all 3 Konva-elements belong to one group. The big circle and the big rectangle have a listener : if you click they change color and become draggable independently. The thin cyan rectangle is the group handler.

If its helps, go to my Github, try the project, it is not perfect but it is a start. Add a comment here if you have questions.

Janfix github Konva undo redo !

The demo is here : https://www.wiquid.fr/projects/KonvaUndoRedo/

Related

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Download the GeoGebra PCI for TAO platform

click here to download

Recent Posts

  • Exploring solution for Scratch PCI
  • Building a ready made solution for Undo-Redo function for Konva.js
  • An electronic circuit simulator in javascript
  • You remember your multiplication tables ? Also in French ? In German ? In Italian ? Go ahead and try !
  • The new version of GeoGebra PCI is now available !

Recent Comments

No comments to show.

Archives

  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • June 2022
  • May 2022
  • April 2022
  • February 2022
  • January 2022
  • December 2021

Categories

  • Uncategorized

Notre partenaire : TICE EDUCATION

©2023 Wiquid Digital Tools for Education | WordPress Theme: EcoCoded