Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom cursors to be disabled (was: React Viewer middle mouse scroll button (DragPan) icon stays selected) #1447

Closed
jumpinjackie opened this issue Mar 29, 2023 · 4 comments
Assignees
Labels
Milestone

Comments

@jumpinjackie
Copy link
Owner

Originally posted here: jumpinjackie/mapguide-maestro#135

**When clicking the middle mouse scroll button (DragPan) it changes to a 'circle with arrows in it' icon, and this will let you pan on the map. However, after doing this doesn't matter what other icons (functions) you click on, on the React Viewer toolbar, or right-clicking on the map it doesn't change the icon back to the selected toolbar function. The functions seem to be selected and working but the icons stay as is.
**

Issue reproduced on the following browsers:
Microsoft Edge, and Google Chrome

MapGuide 4.0.0 Preview 4

MapGuide Maestro Release 6.0m11 (6.0.0.473)

@jumpinjackie
Copy link
Owner Author

I cannot reproduce

@Jackson-Percy
Copy link

Hi Jackie, Please find here https://web.microsoftstream.com/video/02e182de-e681-48bb-9cc4-60f7b15edf26 a video of what happens when I do the same thing, click the wheel on the mouse and hold in, and it works like pan function. However, as you can see the icon does not change back when clicking the Select icon on the toolbar or the Pan icon on the toolbar. The functions still work just the icon does not revert back. As stated it only happens on Chromium browsers (Chrome and Edge) but NOT on Firefox.

@jumpinjackie
Copy link
Owner Author

That link requires a Microsoft login. Can you just attach a zip of the video here?

@jumpinjackie jumpinjackie reopened this May 18, 2023
@jumpinjackie
Copy link
Owner Author

Ok having seen a demo of this issue, I speculate that this is happening as a result of trying to change the mouse cursor. I'll look at a viewer option to disable cursor changing on select/pan/zoom/etc.

Failing that, there is a demonstrable workaround of just double-middle-click again to restore back to the default cursor.

@jumpinjackie jumpinjackie changed the title React Viewer middle mouse scroll button (DragPan) icon stays selected Allow custom cursors to be disabled (was: React Viewer middle mouse scroll button (DragPan) icon stays selected) May 23, 2023
jumpinjackie added a commit that referenced this issue May 29, 2023
…/zoom/etc). This is driven by looking for a DISABLE_CURSORS app setting with a value of 1 in the config state branch.

To support applying intiial app settings, the INIT_APP action supports passing in initial appSettings, which itself is initialized from a new optional appSettings in the mount options. Thus developers may have cursors initially disabled by modifying the viewer template HTML and having the following set in the mount options

```
appSettings: {
    "DISABLE_CURSORS": "1"
}
```

To support changing app settings at runtime, a new SET_APP_SETTING action is introduced which modifies the appSettings property of the config state branch. A new reducer test case is added to exercise this particular action.

Fixes #1447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants