incrementalSelectionEnd should be trigger

// simple tree
[
  { "nodeId": 4 },
  { "nodeId": 5, "children": [{ "nodeId": 31 }, { "nodeId": 32 }] }
]
hwv.selectionManager.selectPart(4, Communicator.SelectionMode.Toggle);
hwv.selectionManager.selectPart(5, Communicator.SelectionMode.Toggle);
hwv.selectionManager.selectPart(31, Communicator.SelectionMode.Toggle);

After executing incrementalSelectionBatchBegin, incrementalSelectionEnd should be triggered. However, in the scenario described above, only incrementalSelectionBatchBegin and incrementalSelectionBatchEnd are triggered.

To optimize performance, I need to handle certain logic only after all batch selections are completed.

Hello @15089700278,

The callback incrementalSelectionEnd is triggered when the function endIncrementalSelection is called. For an example, please refer to the code snippets provided in our docs covering selection, such as the ray drill selection example.

Also, the default area selection operator will trigger these callbacks too.

Thanks,
Tino

Hello @tino

I hope to add a callback to incrementalSelectionStart so that I can reduce operations when dealing with some complex selections.

let inIncrementalSelectioin = false;
hwv.setCallbacks({
  selectionArray: () => {
    if (!inIncrementalSelectioin) {
      // Handle complex computational logic
    }
  },
  incrementalSelectionStart: () => {
    inIncrementalSelectioin = true;
  },
  incrementalSelectionEnd: () => {
    inIncrementalSelectioin = false;
    hwv._callbackManager.trigger('selectionArray', xxx, xxx);
  },
});

Thanks,
Easoncan

You referenced incrementalSelectionStart as a callback. However, such a callback does not already exist. For clarity, is your intention to create your own callback?

Yes, there is no in the official callback, I hope that the official can increase the corresponding Start Callback to process complex computing logic, Thanks.

There is the callback incrementalSelectionBatchBegin. Is this particular callback insufficient for your workflow?

In my first example, incrementalSelectionBatchBegin was triggered, but incrementalSelectionEnd was not triggered, resulting in no complete closed loop.