Skip to content

Commit

Permalink
[BUILD]
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Mar 8, 2024
1 parent 62012a0 commit c4a8660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/ol-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -30540,7 +30540,7 @@ ol.interaction.UndoRedo = class olinteractionUndoRedo extends ol.interaction.Int
if (!init)
init = []
layers.forEach(function (l) {
if (l instanceof ol.layer.Vector) {
if (l.getSource() instanceof ol.source.Vector) {
if (!self._layers || self._layers.indexOf(l) >= 0) {
init.push(l)
}
Expand All @@ -30555,6 +30555,7 @@ ol.interaction.UndoRedo = class olinteractionUndoRedo extends ol.interaction.Int
var vectors = getVectorLayers(map.getLayers())
vectors.forEach((function (l) {
var s = l.getSource()
console.log('SOURCE', s)
this._sourceListener.push(s.on(['addfeature', 'removefeature'], this._onAddRemove.bind(this)))
this._sourceListener.push(s.on('clearstart', function () {
this.blockStart('clear')
Expand Down Expand Up @@ -30593,6 +30594,7 @@ ol.interaction.UndoRedo = class olinteractionUndoRedo extends ol.interaction.Int
/** A feature is added / removed
*/
_onAddRemove(e) {
console.log('undore')
if (this._record) {
this._redoStack.clear()
this._redo.length = 0
Expand Down
2 changes: 1 addition & 1 deletion dist/ol-ext.min.js

Large diffs are not rendered by default.

0 comments on commit c4a8660

Please sign in to comment.