Skip to content

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