mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 22:46:38 +02:00
Preserve Entity immutability
Reintroduced an Entity class. Entity mutations will be expressed as methods that return a new Entity. Extract a move operation from the drag behavior. Instead of updating an entity in place, the drag event produces a new entity and graph and replaces the current history version, which was created by doing a noop on dragstart. pdata is no longer used. It was previously removed from Graph, and I think it makes more sense to have a specialized Entity class as well.
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@
|
||||
<script type='text/javascript' src='js/iD/format/GeoJSON.js'></script>
|
||||
<script type='text/javascript' src='js/iD/format/XML.js'></script>
|
||||
|
||||
<script type='text/javascript' src='js/iD/graph/pdata.js'></script>
|
||||
<script type='text/javascript' src='js/iD/graph/Entity.js'></script>
|
||||
<script type='text/javascript' src='js/iD/graph/Node.js'></script>
|
||||
<script type='text/javascript' src='js/iD/graph/Relation.js'></script>
|
||||
<script type='text/javascript' src='js/iD/graph/Way.js'></script>
|
||||
|
||||
Reference in New Issue
Block a user