Handler.Feature may not trigger click when touching a feature, r=sbrunner

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11943 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-05-03 14:09:09 +00:00
parent e4d13784fa
commit 53984809ce
2 changed files with 9 additions and 3 deletions

View File

@@ -123,7 +123,7 @@
}
function test_callbacks(t) {
t.plan(13);
t.plan(14);
var map = new OpenLayers.Map('map', {controls: []});
var control = new OpenLayers.Control();
@@ -235,6 +235,12 @@
evtPx.type = "touchstart";
map.events.triggerEvent('touchstart', evtPx);
// test touchstart on the same feature
// 'click' callback should be called
callbacks['click'] = getCallback('click (touch)', newFeature);
evtPx.type = "touchstart";
map.events.triggerEvent('touchstart', evtPx);
// test touchstart in new feature and out of last feature
// both 'click' and 'clickout' callbacks should be called
lastFeature = newFeature;