Javascript-Undo-Manager | Simple Javascript undo and redo | Serialization library
kandi X-RAY | Javascript-Undo-Manager Summary
kandi X-RAY | Javascript-Undo-Manager Summary
Simple Javascript undo and redo independent of other libraries
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Remove a circle from the list
- Create circle circle
- Draws all circles
- Draw a circle
- Remove from from array .
- Disable undo UI
- Clear the drawing canvas
Javascript-Undo-Manager Key Features
Javascript-Undo-Manager Examples and Code Snippets
Community Discussions
Trending Discussions on Javascript-Undo-Manager
QUESTION
I learn to create my own library. This is new for me. I start learn with this library, if you see, I have similar clear function
like that library, but my code didn't replace var history
.
Init value: var history = [];
Show(): return []
Add ('asd'): history[0] = 'asd';
Show(): return [asd]
Clear: revert var history to empty var history = []
Show(): return [asd]
what I expect is []
Here is my code:
...ANSWER
Answered 2018-Feb-13 at 14:17Just remove the var
in your clear
method:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Javascript-Undo-Manager
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page