()
| 310 | } |
| 311 | |
| 312 | markToRevert () { |
| 313 | if (this.type() === 'ThangType') { |
| 314 | // Don't deep clone the raw vector data, but do deep clone everything else. |
| 315 | this._revertAttributes = _.clone(this.attributes) |
| 316 | return (() => { |
| 317 | const result = [] |
| 318 | for (const smallProp in this.attributes) { |
| 319 | const value = this.attributes[smallProp] |
| 320 | if (value && (smallProp !== 'raw')) { |
| 321 | result.push(this._revertAttributes[smallProp] = _.cloneDeep(value)) |
| 322 | } |
| 323 | } |
| 324 | return result |
| 325 | })() |
| 326 | } else { |
| 327 | this._revertAttributes = $.extend(true, {}, this.attributes) |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | revert () { |
| 332 | this.clear({ silent: true }) |
no test coverage detected