What is the mean of the second argument of ScreenSpaceEventHandler ?

1. A concise explanation of the problem you’re experiencing.

Hey, I’m learning Cesium source code, but I feel uncertain about the sceond argument of ScreenSpaceEventHandler

like https://github.com/AnalyticalGraphicsInc/cesium/blob/1.61/Source/Widgets/CesiumWidget/CesiumWidget.js#L340:

this._screenSpaceEventHandler = new ScreenSpaceEventHandler(canvas, false);

the second argument is false, and https://github.com/AnalyticalGraphicsInc/cesium/blob/1.61/Source/Scene/CameraEventAggregator.js#L265:

this._eventHandler = new ScreenSpaceEventHandler(canvas, true);

the sceond argument is true. However, the ScreenSpaceEventHandler constructor function just accepts one argument, https://github.com/AnalyticalGraphicsInc/cesium/blob/1.61/Source/Core/ScreenSpaceEventHandler.js#L693:

function ScreenSpaceEventHandler(element) {


So, what is the mean of the second argument ?

Hope your reply, thanks.

It looks like many years ago, there existed a second argument:

But it’s been deprecated and removed, and that code just hasn’t been updated. Feel free to open a pull request to fix that, your contribution would be much appreciated!

Thanks for your reply, it helps me a lot.

在 2019年9月10日星期二 UTC+8下午11:58:11,Omar Shehata写道: