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

Added Foxglove Studio support for deleteAllMarkers function #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yucedagonurcan
Copy link

@yucedagonurcan yucedagonurcan commented Aug 26, 2023

Hello,

I know the filling up the namespace of the reset_marker_ said to be done for debugging reasons but filling it up with anything causes the Foxglove Studio to take this particular message and use the namespace to decide what namespace to remove:

https://github.com/foxglove/studio/blob/64be9e1756f4a027072eb2312a67da01122ff7e1/packages/studio-base/src/panels/ThreeDeeRender/renderables/TopicMarkers.ts#L194-L215

  #deleteAllMarkers(ns: string): void {
    const clearNamespace = (namespace: MarkersNamespace): void => {
      for (const renderable of namespace.markersById.values()) {
        this.remove(renderable);
        this.renderer.markerPool.release(renderable);
      }
      namespace.markersById.clear();
    };


    if (ns.length === 0) {
      // Delete all markers on this topic
      for (const namespace of this.namespaces.values()) {
        clearNamespace(namespace);
      }
    } else {
      // Delete all markers on the given namespace
      const namespace = this.namespaces.get(ns);
      if (namespace) {
        clearNamespace(namespace);
      }
    }
  }

https://github.com/foxglove/studio/blob/64be9e1756f4a027072eb2312a67da01122ff7e1/packages/studio-base/src/panels/ThreeDeeRender/renderables/TopicMarkers.ts#L80-L81

      case MarkerAction.DELETEALL: {
        this.#deleteAllMarkers(marker.ns);
        break;

I am suggesting we remove this one so that whole library could be used with Foxglove Studio too.

@auto-assign auto-assign bot requested a review from davetcoleman August 26, 2023 18:17
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