OpenLayers OpenLayers

Ticket #1723 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Vector feature redrawn offscreen stays invisible

Reported by: jstern81 Assigned to:
Priority: minor Milestone: 2.7 Release
Component: general Version: 2.7 RC1
Keywords: Cc: jstern81@gmail.com
State: Complete

Description

Windows XP Firefox 3

Vector features with external graphics which are redrawn offscreen remain invisible when they are panned back onscreen, and remain so until a zoom change. This issue reared itself when a selected feature was panned offscreen, unselected, and then panned back onscreen.

See an example at: http://t2gnow.com/ol/offscreen-feature-redraw/example.html Click to select, pan the feature offscreen, click the map to unselect, then pan the map back to where it should have been. Alternatively, pan the feature offscreen, click the 'draw feature' link to force a redraw, and then pan back to where the feature should be.

Attachments

1723-r7971-A0.patch (2.3 kB) - added by ahocevar on 09/06/08 13:40:55.
1723-r7971-A1.patch (2.3 kB) - added by ahocevar on 09/08/08 00:40:02.
Removed no longer needed local unrenderedFeatures variable

Change History

09/06/08 13:37:24 changed by ahocevar

  • state set to Awaiting User Feedback.

jstern81: can you please apply the above patch and see if it fixes your issue?

09/06/08 13:40:55 changed by ahocevar

  • attachment 1723-r7971-A0.patch added.

09/06/08 16:57:56 changed by ahocevar

  • state changed from Awaiting User Feedback to Review.

Ok, this issue is obvious because we do not handle the unrenderedFeatures in the drawFeature method. The above patch fixes this, resulting (as a side effect) in more compact and better readable code. (Relevant) tests still pass in FF2/3 and IE7. Please review.

09/07/08 20:11:43 changed by jstern81

Cool, works great and code looks nicer as you say. Could also get rid of the now extraneous local unrenderedFeatures in moveTo:

            if(!zoomChanged && coordSysUnchanged) {
                var unrenderedFeatures = {};

09/08/08 00:40:02 changed by ahocevar

  • attachment 1723-r7971-A1.patch added.

Removed no longer needed local unrenderedFeatures variable

09/08/08 00:41:33 changed by ahocevar

Thanks jstern81, I missed that one.

09/08/08 01:47:42 changed by elemoine

  • state changed from Review to Commit.

Looks good to me. Please commit.

09/08/08 01:52:58 changed by ahocevar

  • keywords set to pullup.
  • state changed from Commit to Pullup.

(In [7976]) moved handling of unrenderedFeatures from moveTo to drawFeature. r=elemoine (pullup #1723)

09/12/08 12:24:20 changed by euzuro

  • keywords deleted.
  • status changed from new to closed.
  • state changed from Pullup to Complete.
  • resolution set to fixed.

(In [8012]) Batch merge for rc2 of 2.7. 'svn merge -r7967:HEAD from trunk (Closes #1733) (Closes #1489) (Closes #1639) (Closes #1718) (Closes #1723) (Closes #1732) (Closes #1616) (Closes #1722)