mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Remove duplicate action
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
// iD/actions/UndoableEntityAction.js
|
||||
|
||||
define(['dojo/_base/declare','iD/actions/UndoableAction'], function(declare){
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// UndoableEntityAction class
|
||||
|
||||
declare("iD.actions.UndoableEntityAction", [iD.actions.UndoableAction], {
|
||||
|
||||
wasDirty: false,
|
||||
connectionWasDirty: false,
|
||||
initialised: false,
|
||||
entity: null,
|
||||
|
||||
constructor:function(_entity) {
|
||||
this.entity = _entity;
|
||||
},
|
||||
|
||||
markDirty:function() {
|
||||
if (!this.initialised) this.init();
|
||||
if (!this.wasDirty) this.entity._markDirty();
|
||||
if (!this.connectionWasDirty) this.entity.connection.markDirty();
|
||||
},
|
||||
|
||||
markClean:function() {
|
||||
if (!this.initialised) this.init();
|
||||
if (!this.wasDirty) this.entity._markClean();
|
||||
if (!this.connectionWasDirty) this.entity.connection.markClean();
|
||||
},
|
||||
|
||||
// Record whether or not the entity and connection were clean before this action started
|
||||
init:function() {
|
||||
this.wasDirty = this.entity.isDirty();
|
||||
this.connectionWasDirty = this.entity.connection.isDirty();
|
||||
this.initialised = true;
|
||||
},
|
||||
|
||||
toString:function() {
|
||||
return this.name + " " + this.entity.entityType + " " + this.entity.id;
|
||||
},
|
||||
});
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// End of module
|
||||
});
|
||||
Reference in New Issue
Block a user