OpenLayers OpenLayers

Ticket #895 (new bug)

Opened 1 year ago

Last modified 6 months ago

Better behaviour of Panel.js

Reported by: jachym Assigned to:
Priority: minor Milestone: 2.7 Release
Component: general Version: SVN
Keywords: Cc:
State: Needs More Work

Description

This patch fixes some behaviour of OpenLayers.Control.Panel control for buttons and toggles:

  • Button can be deactivated, if it was previously activated (new feature)
  • cotrol.triggle() no longer exists(?) (bugfix)
  • Redrawing is called every time some button is pressed (did not work for toggles) (bugfix)

Attachments

Panel.js.diff (1.2 kB) - added by jachym on 08/08/07 02:55:29.
Patch to lib/OpenLayers/Control/Panel.js
Panel.js.diff2 (0.7 kB) - added by sbenthall on 02/07/08 11:45:13.
redraws when buttons pressed and toggles toggled
Panel.js.2.diff (0.7 kB) - added by sbenthall on 02/07/08 12:12:53.
redrawing patch for Panel.js (better formatting)

Change History

08/08/07 02:55:29 changed by jachym

  • attachment Panel.js.diff added.

Patch to lib/OpenLayers/Control/Panel.js

10/10/07 01:04:06 changed by crschmidt

  • milestone set to 2.6 Release.

12/01/07 09:30:33 changed by crschmidt

  • keywords deleted.

Button types are instant-fire actions. They are meant to be used for things like zoomToMaxExtent. The Button Control implements this, as does the canonical Control example, zoomToMaxExtent.

The default type of control (Tool) is meant to be a radio-button style control: this means that you are not meant to be able to turn it 'off': If that functionality is desired, I think it deserves a seperate ticket, since probably more than just the Control.Panel needs to be aware of that.

The last fix -- lack of redrawing for toggle controls -- is definitely a valid fix, and was only not noticed for so long because we don't have any toggle controls yet. However, in order to confirm that this continues to work -- since we don't yet have anything that would actually show it *not* working -- can we please have a test? It should be pretty simple:

c = new OpenLayers.Control.Panel(); // add some toggle controls here c.redraw = function() { t.ok(true, "Redraw called"); } c.activate(a_toggle_control);

Or something similar.

If we can get that, and an updated patch, it will make sense to put this in trunk.

12/15/07 12:01:57 changed by crschmidt

  • state set to Needs More Work.

01/22/08 17:37:11 changed by crschmidt

  • milestone changed from 2.6 Release to 2.7 Release.

Mass ticket move to 2.7 post dev meeting. If you are actively working on this task, please update this ticket with information and change the milestone to 2.6. At the time of the next IRC meeting (most likely 1-31-08), this will mean the ticket can *not* be brought back into 2.6 unless there is further feedback.

02/07/08 11:45:13 changed by sbenthall

  • attachment Panel.js.diff2 added.

redraws when buttons pressed and toggles toggled

02/07/08 12:12:53 changed by sbenthall

  • attachment Panel.js.2.diff added.

redrawing patch for Panel.js (better formatting)