we're migrating from Cesium 1.9 to 1.17 and have an issue with triggering an event handler on click.
In the code below, one click return `scene.pick` as undefined, but the `movement.position` is a Cartesian2 point.
If I double click, my logs show the first `scene.pick` as undefined, but the second `scene.pick` shows the correct point picked. I can repeat this consistently. It never gets picked on the first click, always on the second (provided I click twice REALLY fast).
var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
var travailCanvas = $('#travail-canvas');
// Click handler
handler.setInputAction(function(movement) {
console.log(movement);
var pickedObject = scene.pick(movement.position);
// if (!pickedObject) pickedObject = scene.pick(movement.position);
console.log('picked', movement.position, pickedObject);
if (typeof pickedObject !== 'undefined' && typeof pickedObject.id !== 'undefined') {
if (typeof pickedObject.id._id !== 'undefined') {
var info = JSON.parse(pickedObject.id._id);
if (typeof info.epoch !== 'undefined') {
var date = Cesium.JulianDate.fromDate(new Date(info.epoch));
sceneService.getTravail().setTime(date);
}
}
if (typeof pickedObject.id === 'number') {
sceneService.travail.setPickedActivity(pickedObject.id);
}
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
I've also tried setting the `ScreenSpaceEventType` to `LEFT_DOUBLE_CLICK` which does not return correctly on a double click.
Any ideas on this?