Skip to content

Conversation

@ddjnw1yu
Copy link
Contributor

@ddjnw1yu ddjnw1yu commented Feb 10, 2025

The changes here are for the ticket - Improve Flatmap highlight/selection speed

  • options.sequence is added to make sure the selected features will remain.
  • bbox is returned and passed in to make sure the bounds will always fit.

Currently, there is a short time delay when highlighting a large number of features. Allowing highlighting neuron paths by chunk should be able to minimize the time delay from paths selected to paths highlighted. Although the total time cost may remain the same.

showSearchResults(featureIds)
//===========================
{
this.unselectFeatures();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this used to be the behaviour and then a decision was made (a FCCB request??) to never zoom in to just the found features (and always zoom out so all found features are visible). Has this decision been reversed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find noZoomIn is used anywhere. Instead, the default zoomIn is set to false in the zoomToFeatures(). I assume the parameter noZoomIn was updated to zoomIn sometime in the past.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct!

animate: false
})
return bbox
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I understand how this can be used, I wonder about the rationale behind it, and the need for the caller to incrementally expand the selected features by passing in a bounding box, presumably returned from the previous call to zoomToFeatures().

If you are looking to improve performance by not unselecting and then reselecting previously selected features, then what about a new option called say selection, with values of clear (the default), expand (the current selected feature set is enlarged), and contract (the current selected feature set is shrunk)? Then the external client doesn't have to concern itself with internal representation.

Please raise an issue if you agree that this is better approach that will meet your needs -- it's straightforward for me to implement.

@ddjnw1yu
Copy link
Contributor Author

ddjnw1yu commented Feb 23, 2025

PR closed as the changes are not ideal. A new issue has been created.

@ddjnw1yu ddjnw1yu closed this Feb 23, 2025
@ddjnw1yu ddjnw1yu deleted the modify-highlighting branch August 28, 2025 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants