Skip to content

Commit

Permalink
Fire select event after boxend (#1118)
Browse files Browse the repository at this point in the history
* fire select event after boxend

* add tethys_components to Dockerfile

---------

Co-authored-by: Yue Sun <[email protected]>
  • Loading branch information
Sonia-96 and Yue Sun authored Nov 27, 2024
1 parent 9fa7c11 commit 4cd3f1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ RUN groupadd www \
ADD --chown=www:www resources ${TETHYS_HOME}/tethys/resources/
ADD --chown=www:www tethys_apps ${TETHYS_HOME}/tethys/tethys_apps/
ADD --chown=www:www tethys_cli ${TETHYS_HOME}/tethys/tethys_cli/
ADD --chown=www:www tethys_components ${TETHYS_HOME}/tethys/tethys_components/
ADD --chown=www:www tethys_compute ${TETHYS_HOME}/tethys/tethys_compute/
ADD --chown=www:www tethys_config ${TETHYS_HOME}/tethys/tethys_config/
ADD --chown=www:www tethys_layouts ${TETHYS_HOME}/tethys/tethys_layouts/
Expand Down
10 changes: 7 additions & 3 deletions tethys_gizmos/static/tethys_gizmos/js/tethys_map_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,12 @@ add_drag_box_interaction = function() {

// Call draw end callback
draw_end_callback(feature);

m_select_interaction.getFeatures().push(feature);
m_select_interaction.dispatchEvent({
type: 'select',
selected: [feature]
});
});

m_map.addInteraction(m_drag_box_interaction);
Expand Down Expand Up @@ -1340,9 +1346,7 @@ add_snap_interaction = function() {

add_modify_interaction = function() {
// Modify interaction works in conjunction with a selection interaction
var selected_features;

selected_features = null;
var selected_features = null;

// Create select interaction
m_modify_select_interaction = new ol.interaction.Select({
Expand Down

0 comments on commit 4cd3f1f

Please sign in to comment.