Opened 14 years ago

Closed 14 years ago

#146 closed defect (fixed)

Select radius causes map to pan

Reported by: chrisclaydon Owned by: pagameba
Priority: P1 Milestone: 2.0
Component: Widgets Version: SVN
Severity: Major Keywords:
Cc: Browser: All
External ID: 1150366 Operating System: All
state: Committed

Description

Using the Slate template, zoom in on the map once and then invoke the "Select Radius" command.

When you drag the mouse to define the radius, the whole map pans.

Change History (3)

comment:1 by pagameba, 14 years ago

Owner: changed from madair to pagameba
state: Analysis RequestedAnalysing
Status: newassigned

comment:2 by pagameba, 14 years ago

(In [1638]) Re #146. Move handling of the isExclusive attribute of widgets into the setUiObj method of Widget so that two instances of the same widget don't end up deactivating themselves (visually deactivating the button) while leaving the widget active.

comment:3 by pagameba, 14 years ago

Resolution: fixed
state: AnalysingCommitted
Status: assignedclosed

This was a whole class of issues related to having two instances of the same widget type in the page. what was happening was the Pan widget was the first widget to be created and was activated by default on the map. A second Pan widget was also created and caused all the Pan widgets to be visually deactivated but left the drag pan handler active. Clicking any other widget that was part of the isExclusive set would activate the new widget but not deactivate the handler of the Pan widget because it didn't think it was active to start with.

Moving the isExclusive checks from ApplicationDefinition.js to Widget.js::setUiObject removed some code and cleaned things up regarding the order in which things were happening.

Now the first widget to be created is active by default and all instances of the widget appear active, and selecting another widget correctly deactivates the first one.

Note: See TracTickets for help on using tickets.