Skip to content

Commit

Permalink
[ADD] update to update features in the ListFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Mar 12, 2024
1 parent 0e2eb34 commit 189cd30
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/control/FeatureList.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ ol_control_FeatureList.prototype.sort = function() {
this.refresh(true)
}

/** Refresh the list
/** Refresh the list draw + resize use update if features have changed
* @param {boolean} [force]
*/
ol_control_FeatureList.prototype.refresh = function(force) {
if (force) this._curPage = -1;
Expand All @@ -427,6 +428,13 @@ ol_control_FeatureList.prototype.refresh = function(force) {
this.resize();
}

/** Update the list (when features have changed without dispatching event).
*/
ol_control_FeatureList.prototype.update = function() {
this._drawList();
this.select(this._curSelection.feature, true)
}

/** Get height of a row
* @return {number}
*/
Expand Down Expand Up @@ -527,6 +535,7 @@ ol_control_FeatureList.prototype.getColumns = function(features) {
ol_control_FeatureList.prototype.setColumns = function(columns) {
this.columns = columns || [];
this._drawList();
this.select(this._curSelection.feature, true)
}

/** Dragging sizer
Expand Down

0 comments on commit 189cd30

Please sign in to comment.