From 9c379ff0e8e73ac99180b802afb93ddaa89e68d2 Mon Sep 17 00:00:00 2001 From: Robert Nordan Date: Fri, 31 May 2013 14:16:18 +0200 Subject: [PATCH] Make test/example actually check ondragstart/end --- debug/tests/set_icon_reuse_dom.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debug/tests/set_icon_reuse_dom.html b/debug/tests/set_icon_reuse_dom.html index d46528d4..1e9d68ac 100644 --- a/debug/tests/set_icon_reuse_dom.html +++ b/debug/tests/set_icon_reuse_dom.html @@ -19,18 +19,18 @@ var map = L.map('map').setView( [50, 50], 10); - var marker = L.marker([50, 50], {icon: blueIcon}); + var marker = L.marker([50, 50], {icon: blueIcon, draggable: true}); - marker.on('mouseover', function () { - console.log('mouseover'); + marker.on('dragstart', function () { + console.log('dragstart'); marker.setIcon(redIcon); //This is the previous workaround: //var iconElem = L.DomUtil.get(marker._icon); //iconElem.src = 'http://www.webatlas.no/webatlasapi/v/071009/media/interface/default/markers/flag_red.gif'; }); - marker.on('mouseout', function () { - console.log('mouseout'); + marker.on('dragend', function () { + console.log('dragend'); marker.setIcon(blueIcon); //This is the previous workaround: //var iconElem = L.DomUtil.get(marker._icon);