Ticket #1759 (closed task: fixed)

Opened 5 years ago

Last modified 5 years ago

replace unnecessary, undocumented 'drawn' property on OpenLayers.Marker

Reported by: euzuro Owned by: euzuro
Priority: minor Milestone: 2.8 Release
Component: Marker Version: 2.7
Keywords: Cc:
State:

Description

it is not listed anywhere, but we are pinning a 'drawn' flag onto the marker as it is added to the markers layer. this is used to prevent re-drawing of markers, but really, it can be replaced with an accessor function on the marker called that simply checks to see if the marker's icon's imageDiv has been added to somewhere.

Attachments

isDrawn.patch Download (4.7 KB) - added by euzuro 5 years ago.
tests pass ie & ff. adding isDrawn() -- to marker and to icon.

Change History

Changed 5 years ago by euzuro

tests pass ie & ff. adding isDrawn() -- to marker and to icon.

Changed 5 years ago by elemoine

This is looking good. I would just save the isDrawn variable and have the isDrawn functions do: return this.icon && this.icon.isDrawn(). Please commit.

Changed 5 years ago by euzuro

Changeset 8091 View differences Show lines around each change Ignore: Blank lines Case changes White space changes

Timestamp:

10/04/08 16:13:28 (less than one hour ago)

Author:

euzuro

Message:

getting rid of unnecessary, undocumented 'drawn' property on marker. replacing it with accessor function isDrawn(), and putting an isDrawn() in icon as well. all tests pass r=elemoine (Closes #1759)

Changed 5 years ago by euzuro

  • status changed from new to closed
  • resolution set to fixed

btw elemoine, i break that func up into 2 lines for debugging purposes.... so you can let firebug pause after evaluating those conditions and you can see the values.

if you hate it, though, i'm certainly open to change.

Changed 5 years ago by tschaub

  • status changed from closed to reopened
  • resolution fixed deleted

Haven't checked the validity, but #1766 says that r8091 broke stuff.

Changed 5 years ago by elemoine

r8091 does break stuff. marker.draw() used to be called un-conditionally, which led to having icon.moveTo() always be called. The patch attached to #1766 makes sense to me - call draw() when the marker isn't already drawn, and moveTo() when the marker is already drawn.

Changed 5 years ago by tschaub

  • status changed from reopened to closed
  • resolution set to fixed

Lets say this re-open state is a dupe of #1766 and close this.

Changed 5 years ago by tschaub

And r8230 closes #1766.

Note: See TracTickets for help on using tickets.