나는 .interaction.Select을 한 번 클릭하고 다른 한 번을 두 번 클릭하여 견인했습니다.클릭하고 두 번 클릭하여 상호 작용의 선택을 취소하십시오. OpenLayers 3
var selectDoubleClick = new ol.interaction.Select({
multi: true,
condition: ol.events.condition.doubleClick,
style: function(feature) {
//stuff here;
}
return feature;
}
selectDoubleClick.on('select',function(event) {
//stuff here
}
var selectSingleClick = new ol.interaction.Select({
multi: true,
condition: ol.events.condition.singleClick,
style: function(feature) {
//stuff here
}
return feature;
}
selectSingleClick.on('select',function(event) {
//stuff here
}
하지만 더블 클릭을 취소하려면지도에서 두 번 클릭해야합니다. 단 한 번의 클릭으로 더블 클릭을 취소 할 수 있습니까?
두 번 클릭하면 모두 할당되며'return feature; '는 두 번 클릭했을 때 의미가 없습니다. 스타일 함수 안에 있어야합니까? 우리는 당신의지도가 어떻게 생겼는지조차 모릅니다. 그래서 우리가 당신을 돕기 위해 살아있는 모범을 보여줄 수 있습니까? – Icarus
그렇습니다. 이카루스, 실수.하지만 오류는 계속됩니다. 더블 클릭으로 선택된 기능을 선택 해제 할 때 두 번의 클릭으로 선택을 취소해야합니다. –