Opened 9 years ago

Closed 9 years ago

#797 closed enhancement (fixed)

Patch to change the active tool Cursor in ajax viewer

Reported by: bscott Owned by: waltweltonlair
Priority: medium Milestone: 2.2
Component: AJAX Viewer Version: 2.0.2
Severity: trivial Keywords:
Cc: External ID:

Description

The Community code sample Displaying custom cursors when the zoom tool is selected would add a real value to the final product if it was included in the ajaxviewer.

There's a thread in nable that tack about it http://www.nabble.com/Patch-to-change-the-active-tool-Cursor-in-ajax-viewer-td20789750.html

I can't figure out how to attach binary cursor files in a diff patch, so i have attached them in a separate zip files

Attachments (6)

Patch_icons.patch (1.0 KB) - added by bscott 9 years ago.
patch_stdicons.zip (2.7 KB) - added by bscott 9 years ago.
cursors.zip (1.6 KB) - added by tomfukushima 9 years ago.
Alternate set of cursors created by Autodesk product design
mapguide_allcursor.patch (6.0 KB) - added by bscott 9 years ago.
MapguideCursorBig.zip (8.8 KB) - added by bscott 9 years ago.
cursorsNew.zip (4.6 KB) - added by waltweltonlair 9 years ago.
Update set of alternate cursors created by Autodesk product design

Download all attachments as: .zip

Change History (16)

Changed 9 years ago by bscott

Attachment: Patch_icons.patch added

comment:1 Changed 9 years ago by tomfukushima

Before I apply the patch, please do the following: Set appropriate hotspots on all the cursors. They are currently all set to 0,0 but that is quite far away from the actual cursor image. The hotspot for the pan cursor does not really matter, but it would be good to center it on the hand. The hotspot for the zoom in and out should be at the center of the + and - in the magnifier glass area. It's not as apparent where to put the hotspot for the zoom rectangle, but perhaps we could try putting a + in the center of the magnifying glass and use that as the hotspot. Thanks, Tom

comment:2 Changed 9 years ago by tomfukushima

Also, please state the source of those cursors. We don't want to run into any copyright problems.

Changed 9 years ago by bscott

Attachment: patch_stdicons.zip added

comment:3 Changed 9 years ago by bscott

Thanks for the comments Tom, So i have fixed all the hot spots and i have also fixed the alpha chanels, so the transparency is cleaner. The sources or the previous cursors files was the one i founded in the Mapguide Community sample codes, These one have been created ( by me ) using the gif files in the mapguide stdicons directory.

comment:4 Changed 9 years ago by tomfukushima

Hi,

The icons look pretty good. Our product designer may create a replacement set that are a little more generic; but there probably won't be time. Otherwise, if you could make them a little bigger so that they are clearer that would be good. Also, I don't think that the pan cursor needs the + on it.

Our product designer noted following problems that will need to be corrected before submission:

  1. Open the web layout in the browser. Select the Zoom rectangle mode (notice that the cursor is correctly changed to the zoom rectangle cursor). Do a zoom operation. Do a "zoom previous" operation. Notice that even though the map is still in the "zoom rectangle" mode the cursor is now incorrectly the select cursor.
  2. Open the web layout in the browser. Select the zoom rectangle mode. Select the measure distance task. Notice that the cursor is still the zoom rectangle cursor even though the map is now in measure distance mode.

The above problems mention Zoom rectangle, but probably also affect the other modes.

Changed 9 years ago by tomfukushima

Attachment: cursors.zip added

Alternate set of cursors created by Autodesk product design

comment:5 Changed 9 years ago by bscott

Hi tom, I have made all the fixes you requested, plus others. I took a more global approach, so i have overridden all cursors

Measure SelectPolygon? SelectRadius? DigitizePoint? DigitizeLine? DigitizeLineString? DigitizeCircle? DigitizeRectangle? DigitizePolygon?

All these cursors a bigger than the initial versions

Bruno

comment:6 Changed 9 years ago by tomfukushima

Hi Bruno, Thanks for the changes. Problem 2 above was resolved, but I can still reproduce 1. Try these steps...

  1. Open the Sheboygan sample map
  2. Select the Zoom rectangle mode
  3. Do a zoom rectangle operation to zoom in
  4. Click on the Zoom menu on the toolbar, and select "Previous View"

Note that after the map zooms back to the previous view, the cursor is now the select cursor when it should still be the zoom rectangle cursor. The same problem occurs with Zoom in mode, Zoom out mode, pan mode, etc.

comment:7 Changed 9 years ago by bscott

Oops Sorry, i forgot that little point :( I've replaced the mapguide_allcursor patch with a fixed one

Bruno

Changed 9 years ago by bscott

Attachment: mapguide_allcursor.patch added

Changed 9 years ago by bscott

Attachment: MapguideCursorBig.zip added

comment:8 Changed 9 years ago by bscott

I've just replace one of the cursor, the ZoomRect?.cur had a plus sign and should not. Bruno

Changed 9 years ago by waltweltonlair

Attachment: cursorsNew.zip added

Update set of alternate cursors created by Autodesk product design

comment:9 Changed 9 years ago by waltweltonlair

Milestone: 2.12.2
Owner: set to waltweltonlair
Status: newassigned

comment:10 Changed 9 years ago by waltweltonlair

Resolution: fixed
Status: assignedclosed

Fixed in the trunk stream with submission https://trac.osgeo.org/mapguide/changeset/3735.

I used the Autodesk-supplied cursors.

Thanks bscott for providing this nice patch.

Note: See TracTickets for help on using tickets.