[OpenLayers-Users] dragmakerer

Paul Stanton paul.stanton at gunnsoft.com.au
Tue Nov 6 20:04:49 EST 2007


beautiful, thank you.

changed:
if (this.layer.markers[i].icon.imageDiv.firstChild == node) {
to:
if (this.layer.markers[i].icon.imageDiv.firstChild == node || 
this.layer.markers[i].icon.imageDiv == node) {

so if someone would like to update the version on the openlayers server, 
that might help some people.

Paul.

Christopher Schmidt wrote:
> On Fri, Nov 02, 2007 at 02:31:38PM +1100, Paul Stanton wrote:
>   
>> Well, I was just about to ... but then I noticed something further:
>>
>> It's not just the top left of the marker that can be dragged, but any 
>> transparent zone of the marker.png! I tested this theory by creating a 
>> new marker.png with a transparent center, and guess what, now I can drag 
>> from the center!
>>     
>
> heh. Fun. You want to look at Handler.Marker. There's a check there to
> find 'is this marker that was just clicked the right one?' and you need
> to modify that check to work differently. I think right now it looks at
> icon.imageDiv, but apparently the icon.imageDiv.firstChild is whati t
> needs to look for as well (or vice versa).
>
> Regards,
>   





More information about the Users mailing list