Comments (4)
The undo/redo support is somewhat unrelated to fabric itself. The behavior of history management will likely vary based on your needs. Which actions are added to history stack? When an object is moved, is every pixel tracked and added to a history? Or is move action added to history only when object is "stopped" (mouse up)? How about other object modifications — scaling, rotation — are they considered undoable actions as well?
I think that history management should be implemented separately of fabric, according to specific requirements. It can be plugged into fabric via events that library exposes — http://kangax.github.com/fabric.js/demos/events/
from fabric.js.
There argument here is that here is no "one true way", but it's not true.
I don't think there are any ambiguities here at all.
Other that "every pixel tracked" action, everything you mentioned is undoable in all (vector) image editing tools I have ever seen.
It's the norm to consider mouse drag actions to start with mouse down and and end with mouse up. And simply down event for buttons. Mouse buttons don't auto-repeat, and keyboard auto-repeat is handled by the window manager such that the application received a stream of button down events.
It'd solve the problem for users.
from fabric.js.
from fabric.js.
This Fiddle can be useful
http://jsfiddle.net/SpgGV/9/
from fabric.js.
Related Issues (20)
- [Feature]: Implemeting/replacing math based bbox/path logic
- [Bug]: [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. HOT 4
- [Feature]: Add before: selection: update event listening HOT 7
- [Bug]: Clipping Group with shadows will result in the loss of the canvas background. HOT 10
- [Bug]: dynamic draw polyline will disappear after move canvas
- How could implement async filters with worker for v6 HOT 3
- [Bug]: What is the situation where a group composed of two polygons in fabricjs is restricted to a rectangular area when dragging points, and graphics are not displayed outside the rectangular area? HOT 3
- `FabricObject#animate` multiple props bug
- [Feature]: In a multi-select scenario, when a subset is selected, the parent element should be deselected. HOT 3
- [Bug]: lowerCanvas is set to different size than upperCanvas when emulating mobile device on Chrome HOT 3
- [BUG] Grouped objects are not seen within the bounding box HOT 2
- [Bug]: Fabric.js is not defined HOT 4
- [Bug]: Canvas load from json, group nested objects invisible after changing position HOT 6
- [Feature]: In mobile device lower-canvas height and width attribute value is greater then upper-canvas HOT 4
- [Bug]: Components uninteractable in deveoplment mode but work in production HOT 10
- [Bug]: createPolyControls with two points (Line) has locked axis HOT 10
- [Bug]: setBackgroundColor invalid HOT 6
- [Bug]: font weight is not working HOT 3
- [Bug]: Node export to dataURL is wrong HOT 1
- Notes for myself to investigate and fix
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabric.js.