[Script] WME Context Menu

(This script was formerly called WME Copy Menu.)

WME Context Menu stores various editor elements in an easy-to-access right-click context menu. It can currently copy certain properties of selected segments directly to your clipboard and it integrates with WME Speedhelper and WME Road Selector to help make it even easier and faster to edit the map.

To open the menu, select segment(s) and right-click. Flip between copying to clipboard (1), WME Road Selector integration (2) and WME Speedhelper integration (3) using the buttons in the menubar or pressing their numbered hotkeys while the menu is open: 1, 2, or 3. Activate the push-pin to pin the menu anywhere on the map and prevent it from closing.

If you do not have WME Road Selector installed, the button does nothing and the script will only copy to your clipboard.
If you do not have WME Speedhelper installed, the button will still give you the default WME input panel for editing speed limits.

This was just a recent idea that I had after experiencing several minor annoyances and frustrations with adding speed limits in WME. The first versions of the code were quickly put together over the course of just 2-3 days and so it is definitely in its infancy. Ideas for integrating the context menu with other WME or userscript functions are welcomed. As always, bug reports are greatly appreciated.

https://greasyfork.org/en/scripts/17087-wme-context-menu


Given the big push by Waze to add speed limits (SLs) to the map, the update to version 0.3 provides a few enhancements that I hope you’ll find helpful in getting the job done:

  • Right-clicking directly on a segment will also open the menu. It is no longer necessary to select a segment before right-clicking.

  • Relatedly, the context menu will now only show when you right click while hovering over a segment.

  • When the menu is in pinned mode, you can drag the menu to anywhere except the left side panel. (I like to place mine between the map and street view.)

  • The behavior of the numeric hotkeys (1-3) for switching among the 3 panels of the context menu has been modified:

  • When the menu is not pinned to the map, pressing the hotkeys will work anywhere, regardless of your cursor position.

  • When the menu is pinned, the hotkeys will only activate when your cursor is on the menu.

  • (In response to milkboy’s request) Verified SLs are highlighted in green if the value matches one of Speedhelper’s signs. Unverified SLs are highlighted yellow.

  • Two-way roads with differing SL values in each direction are indicated by an A- or B- start node badge on top of the sign.

  • You can use Speedhelper’s SL signs to selectively assign speed to either A-B or B-A direction:

  • Shift-click for A-B direction,

  • Alt-click for B-A direction

For B-A directions, if you don’t like the alt-key, you can actually use any of the 3 modifier keys under the shift key (i.e., one of these: ctrl/alt/meta/cmd).
WMECM_hotkeys_pc.pngWMECM_hotkeys_mac.png
Use whichever modifier key for the B-A direction that works best for you.

  • Speedhelper’s SL signs within the context menu will automatically adjust the units of your speeds to those used by the country
    (i.e., if your country uses mph, but WME is set to metric, the script will automatically convert their values to km/h.)

As a reminder—these enhanced features listed above currently apply to only the Speedhelper panel within the context menu.

Here’s a better normal sized screenshot of the Speedhelper integration menu…

Note that the speed on the signs differ from what’s in the input box because I have WME set to metric, but USA uses mph. The context menu add-on will automatically convert the values of the Speedhelper signs to the units used by your WME setting.
WMECM - Speedhelper menu.png

WME Context Menu has been updated to version 0.3.3 to be fully compatible with latest versions of Firefox. Please let me know if anyone is experiencing any issues.

Interesting.

I hope “interesting” = good. :lol:

Great work very useful !!

Note: As of the recent update, you can now drag the speed limit signs in the menu and drop them into the input box for A–>B or B–>A direction.

New in version 0.3.5:
(plus other bug fixes)

(unavailable attachment: WMECM 0.3.5 - Unidir SL update)

(unavailable attachment: WMECM 0.3.5 - Drag-and-drop)
Drag-and-drop feature available only when WME Speedhelper has also been installed.

Update released - 2018.08.24.01

Fixing issues introduced in WME updates since this was last updated by TLTT. I believe existing functionality is now fully functional, if not please let me know.

Update released - 2018.09.17.01

Fixed more issues introduced due to WME updates.

Added an Edit Attributes menu which allows you to edit the unpaved, tunnel and headlights properties, segment direction, lock level and elevation on the selected segment(s).

1 Like

Update released - 2018.09.20.01

Implemented “center to begin-end of street” script functionality, only displaying when a single segment is selected, with the interface being more easily usable (close to the segment/mouse) and the name being less awkwardly long :slight_smile:

Clicking A or B will take you to that node and Return will take you back to the position you were at before jumping to one of the nodes.

1 Like

Update released - 2018.11.15.01

Adding support for changing uturns on a single selected segment.

This operates the same as the WME interface - if the arrow is red the uturn is disabled, if it is green it is enabled. Clicking on the node or the uturn arrow will toggle the status and Both will toggle both the A and B nodes.

I am unable to type out the numbers 1, 2, or 3 on my keyboard (on two different computers) while running this script, and occasionally the exclamation point symbol.

Alright! Fine! I’ll finally look at this (it’s been reported a few times before).

:lol:

Quick workaround: click in the WME search box then click out of it again. That re-activates the keys. :slight_smile:

The Speedhelper-Integration displays wrong speed signs for Germany

WME Speedhelper, Version 0.10.9 from https://greasyfork.org/scripts/13774-wme-speedhelper/code/WME%20Speedhelper.user.js
WME Context Menu, Version 2018.11.29.01 from https://greasyfork.org/scripts/17087-wme-context-menu/code/WME%20Context%20Menu.user.js
Tampermonkey V4.8.5847 for Firefox 65.0.1 (64-Bit) Windows

Speedhelper-Integration to WME Context Menu
[attachment=0]Speedhelper-Integration.PNG[/attachment]

Speehelper’s own display at left tools column
[attachment=1]Speedhelper.PNG[/attachment]

Feature suggestion: If possible and you feel it is worth the trouble.

When you right click on a junction node, you get a context menu that will allow you to set the u-turns to green or red on both of the segments at the selected junction node.

Hello. A-B nodes jumping don’t work. Is this script still actual?

This is now fixed. Thanks for reporting!