OpenLayers OpenLayers

Ticket #471 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

Layer.Text markers show a popup even if no popup text is set

Reported by: openlayers Assigned to: sderle
Priority: minor Milestone: 2.4 Release
Component: Layer.Text Version: 2.2
Keywords: Cc:
State:

Description

When using Layer.Text, if the text file does not contain description or title for a popup to appear on click of the marker, a popup is still applied. This results in a popup appearing with no obvious way to close it.

OpenLayers\Layer\Text.js should first check on line 129 if title and description is not null before assigning the onClick handler.

Attachments

Text.js.diff (0.8 kB) - added by danielm on 01/23/07 17:28:57.
Changes the text layer so if title and description is null then the marker onClick event is not set. This makes the unit tests fail though cause they are expecting the onClick handler.
text_layer.patch (3.0 kB) - added by crschmidt on 03/18/07 09:12:03.
same as other patch, adds tests for both cases
471.patch (3.4 kB) - added by sderle on 03/19/07 15:31:15.

Change History

01/23/07 17:28:57 changed by danielm

  • attachment Text.js.diff added.

Changes the text layer so if title and description is null then the marker onClick event is not set. This makes the unit tests fail though cause they are expecting the onClick handler.

01/23/07 17:29:32 changed by danielm

  • keywords changed from marker popup to marker popup review.

01/31/07 07:19:15 changed by crschmidt

  • milestone set to 2.4 Release.

danielm: an update to the tests to include one item which has an onclick and one that doesn't, and adjusting the responses to fit that, would make me happier about this. If you can add that, I'll apply/review/commit.

03/18/07 09:12:03 changed by crschmidt

  • attachment text_layer.patch added.

same as other patch, adds tests for both cases

03/18/07 09:12:46 changed by crschmidt

New patch updates tests, awaiting review.

03/18/07 09:14:55 changed by crschmidt

  • keywords changed from marker popup review to review.

03/19/07 13:32:49 changed by sderle

  • owner changed from crschmidt to sderle.
  • status changed from new to assigned.

07:12 < Schuyler> on #471, is it possible that a user might want to render a

popup with either a title or a description, even if the other one is missing?

07:13 < crschmidt> yes 07:13 < crschmidt> I'd say that "&&" should be an

03/19/07 13:33:28 changed by sderle

that should be "pipe pipe" ... darn Trac

03/19/07 15:31:15 changed by sderle

  • attachment 471.patch added.

03/19/07 15:37:05 changed by crschmidt

Patch is good in my eyes.

03/19/07 16:52:28 changed by sderle

  • status changed from assigned to closed.
  • resolution set to fixed.

For reasons that aren't clear, my patch causes horrible test failures. Rather than continue to fight with this, I'm going to commit Chris's patch instead and move on.

Fixed by r2820.

07/05/07 17:06:56 changed by euzuro

  • keywords deleted.