Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#223 closed defect (fixed)

All instances of widget should not necessarily be activated together

Reported by: pagameba Owned by: madair
Priority: P1 Milestone: 2.0
Component: Widgets Version: 2.0 - beta
Severity: Critical Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

In Fusion 2.0, we introduced a feature that visually activated all instances of the same widget so that when a toolbar widget was activated, the same type of widget on the context menu would be activated and vice-versa. This works well for simple widgets such as Pan but falls short if instances of the same widget have different behaviour based on their configuration. The most obvious example of this is the Zoom widget, which can be configured to zoom in or out.

The proposed fix is to add a new method to Widget.js called shouldActivateWith that takes a widget as an argument. The default behaviour will be to return true but specific widgets can overload this method and return false if the widget is not configured the same way.

This may apply to other widgets such as Select which can be configured to select on the active layer only or all layers. Two instances with different settings should not be activated together.

Change History (4)

comment:1 by pagameba, 16 years ago

Resolution: fixed
Status: newclosed

(In [1814]) closes #223. Modify widget activation to only activate other widgets if they should be activated and provide a hook for individual widgets to determine whether they should be activated or not. Modified Zoom and Select to use this new feature. Other widgets that have problems should be reported as separate tickets.

comment:2 by pagameba, 16 years ago

(In [1815]) re #223. Missing comma.

comment:3 by pdeschamps, 16 years ago

(In [1818]) re #223: be careful to check if widgets should be initially activated too

comment:4 by pdeschamps, 16 years ago

(In [1819]) re #223: be careful to check if widgets should be initially activated too

Note: See TracTickets for help on using tickets.