openlayers 3 - Openlayers3 clicking outside feature deselects all features -


i continue using default toggle options of interaction.select, user can have 1 feature selected @ time. however, when user clicks outside of feature, not want remove selected feature. there way achieve this? thank in advance.

i able solve problem following...

var select = new ol.interaction.select({             style: vm.selectedfeaturestyle,             condition: function (event) {                 if (event.type === 'singleclick') {                     return vm.map.foreachfeatureatpixel(event.pixel, function () {                         return true;                     });                 }                 return false;             }         }); 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -