Magicien/undo-canvas: Add Undo/redo Functions To ... - GitHub

Skip to content Dismiss alert {{ message }} / undo-canvas Public
  • Uh oh!

    There was an error while loading. Please reload this page.

  • Notifications You must be signed in to change notification settings
  • Fork 9
  • Star 36

Add undo/redo functions to CanvasRenderingContext2D

License

MIT license 36 stars 9 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings
  • Code
  • Issues
  • Pull requests
  • Actions
  • Projects
  • Security

    Uh oh!

    There was an error while loading. Please reload this page.

  • Insights
Additional navigation options magicien/undo-canvas  masterBranchesTagsGo to fileCode

Folders and files

NameNameLast commit messageLast commit date

Latest commit

 

History

21 Commits
.github.github  
.gitignore.gitignore  
LICENSELICENSE  
README.mdREADME.md  
demo.htmldemo.html  
demo2.htmldemo2.html  
index.jsindex.js  
package.jsonpackage.json  
test.htmltest.html  
test.web.jstest.web.js  
undo-canvas.jsundo-canvas.js  
View all files

Repository files navigation

  • README
  • MIT license
undo-canvas

Add undo/redo functions to CanvasRenderingContext2D

Online Demo 1 / Demo 2

<script src="https://cdn.rawgit.com/magicien/undo-canvas/v0.1.3/undo-canvas.js"></script> <script> const canvas = document.createElement('canvas') const context = canvas.getContext('2d') UndoCanvas.enableUndo(context) context.strokeStyle = '#ff0000' context.beginPath() context.moveTo(0, 0) context.lineTo(30, 30) context.closePath() context.stroke() context.undo() // erase the line context.redo() // redraw the line UndoCanvas.disableUndo(context) </script>

Install

Node

npm install --save undo-canvas

Browser

<script src="https://cdn.rawgit.com/magicien/undo-canvas/v0.1.3/undo-canvas.js"></script>

About

Add undo/redo functions to CanvasRenderingContext2D

Topics

canvas undo-redo canvasrenderingcontext2d

Resources

Readme

License

MIT license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

36 stars

Watchers

1 watching

Forks

9 forks Report repository

Releases

4 tags

Sponsor this project

Sponsor

Uh oh!

There was an error while loading. Please reload this page.

Learn more about GitHub Sponsors

Packages

No packages published

Uh oh!

There was an error while loading. Please reload this page.

Languages

  • JavaScript 67.9%
  • HTML 32.1%
You can’t perform that action at this time.

Tag » How To Undo On Canvas