Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire select event after boxend #1118

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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