43 Commits

Author SHA1 Message Date
Devin Fahnestock
313022728c prevent map panels from covering up edit menu, fixes #10495 (#10586) 2024-12-13 15:08:50 +01:00
Martin Raifer
73773b61f1 Fix context "edit" menu on touchscreens
* render labels properly, fixes #9425
* always open the touch-specific edit menu (the contextmenu event is always triggered by the browser on long presses, where we need to make sure that this event doesn't override the `isTouchMenu` property of the edit menu)
2023-01-19 18:27:02 +01:00
Martin Raifer
85022dcc6c render operations texts with lang attribute 2022-06-23 19:23:16 +02:00
Martin Raifer
ac77289b4d refactor localized text rendering in tooltips, flash messages 2022-06-23 18:55:57 +02:00
Martin Raifer
d062c1b0da emphasise when split affects multiple ways
* new icon with two "sciscors" indicates that there will be more than one split perfomed
* the tooltip mentions that one can limit to a single line

closes #8818
2021-11-30 16:27:56 +01:00
teymour-aldridge
90d3f59aa6 Remove some unneeded variables.
These should theoretically actually slow down the JIT (if very marginally) so performance-wise it's better not to have them.
2020-10-14 19:00:10 +01:00
Quincy Morgan
21a49bbec8 Initial support for D3 v6.2.0 2020-10-06 15:08:39 -04:00
Quincy Morgan
27003d9e71 Highlight related but unselected features when hovering over operations in the edit menu (close #8034) 2020-09-30 16:46:13 -04:00
Quincy Morgan
8883c2f36d Fix uiFlash issues
Clean up a few things from prior commit
2020-09-22 12:19:54 -04:00
Quincy Morgan
32f8274929 Make t function return a span element with a lang attribute unless html: false is specified in the options (re: #7963)
Update `text` functions to `html` to support inserting the `span` elements
Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
2020-09-15 21:56:22 -04:00
Quincy Morgan
3892600814 Reduce redundant strings in the walkthrough
Update the lines walkthrough chapter for touchscreens
Add toggled dispatch event to the edit menu
2020-07-10 15:24:01 -04:00
Quincy Morgan
6e04e31140 Merge branch 'develop' into touch-walkthrough-update 2020-06-30 16:57:58 -04:00
Quincy Morgan
cf362cdcac Keep the edit menu open while panning the map but not zooming 2020-06-30 11:50:56 -04:00
Quincy Morgan
8234079d10 Show operation icon colors in the help pane 2020-06-29 17:08:06 -04:00
Quincy Morgan
c60dcba769 Be smarter about positioning the labeled edit menu (re: #7577) 2020-06-27 13:28:36 -04:00
Quincy Morgan
0f0f0637ee Disable Move and Rotate menu buttons for touch interaction for now (re: #7599) 2020-06-26 17:18:35 -04:00
Quincy Morgan
5e58259c12 Show labels for edit menu items on touch interaction (re: #7577) 2020-06-26 13:34:54 -04:00
Quincy Morgan
d441c5b0c6 Flash operation annotation when tapping buttons with touch or stylus (re: #7699) 2020-06-25 11:21:23 -04:00
Quincy Morgan
1e68917e2a Flash tooltip text when tapping undo/redo toolbar buttons and disabled operation buttons on touch devices (re: #7699) 2020-06-12 12:48:16 -04:00
Quincy Morgan
23714ba822 Position the edit menu above the anchor point if triggered via touch or stylus (re: #7577)
Add additional code safety to behaivorSelect
2020-05-12 18:42:36 -04:00
Quincy Morgan
e6fc7e221a Fix menu position when long-pressing features on touchscreens (re: #7577)
Improve comment
2020-05-10 10:59:56 -07:00
Quincy Morgan
a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
Quincy Morgan
4a67e8c5dc Remove delay in opening the edit menu
Don't show the edit menu for multiple selected relations
Streamline edit menu code, replacing the confusing "suppressMenu" system
2020-03-26 12:48:30 -07:00
Quincy Morgan
37b1f35ab4 Properly switch the edit menu tooltip side depending on space 2020-03-25 15:34:02 -07:00
Quincy Morgan
13c8753c11 Reuse the uiEditMenu instead of recreating it every time the operations change 2020-03-25 14:49:24 -07:00
Quincy Morgan
5c2a96dedb Fix issue where the edit menu would not disappear sometimes (close #7143)
Properly disable dragging the map under the edit menu for pointer events (re: #5505)
2020-03-25 14:33:42 -07:00
Quincy Morgan
9731b93cec Move uiTooltipHtml functionality into uiTooltip
Refactor uiEditMenu to use standard UI patterns instead of SVG
2020-03-25 12:22:10 -07:00
Quincy Morgan
0931459dba Reduce use of global selection (re: #7445) 2020-03-24 13:02:06 -07:00
Quincy Morgan
36082a8119 Use ideditor as the container class instead of id-container
Scope all CSS to iD's container (close #7437)
Don't style html or body elements unless running standalone iD
2020-03-22 16:54:12 -07:00
Quincy Morgan
145d6aef4f Add class to operation button icons 2020-01-16 10:58:04 -05:00
Quincy Morgan
523a467836 2.x: Make toolbar horizontally scrollable when it overflows (re: #6755, re: 7545f67063b5e7007ef2d8367e3181e59c04a487)
Generalize tooltip into popover control
Use the same popover control for tooltip as the preset browser and tools list popovers
Smartly position the preset browser popover and menu bar tooltips to stay fully onscreen
Position most tooltips closer to their controls
Fix small gap that could appear between a tooltip and its arrow
Allow wider toolbar tooltips
2019-12-16 13:30:07 -05:00
Bryan Housel
289c75fee1 When showing tooltip, update disabled in case disabled states disagree
(closes #6296)
2019-05-07 17:53:22 -04:00
Bryan Housel
81127d71f3 Cache disabled() results in straighten action for consistent response
What could happen was:
- user could right click on a line
- this would trigger `disabled()` checks for each operation buttons
- the line was not fully downloaded, so would return `disabled()` 'not_downloaded'
  (and also start download of the missing tiles)
- then the tooltip would pop into existence, calling `tooltip()`
- which calls `disabled()` again
- but this time it's fine and the `disabled()` is false
- so you'd see a greyed out button but the tooltip said everyting is ok and
  you can click the button anyway

I fixed this by just caching the disabled test.  This is probably ok anyway
because these tests can be expensive, and then the user will see a consistent
message like "The line is not yet fully downloaded".

If the user clicks off the line and back onto it, iD will reenter select mode,
rebuild the menu, redo the disabled test, and they will see the button enabled.
2019-04-10 10:19:23 -04:00
iriman
bc9a64058f [RTL] place edit menu under #id-container to inherit rtl 2019-01-14 15:50:31 +03:30
Bryan Housel
470835b38f Extract all graphics from iD sprite, reassemble with svg-sprite
All iD sprite graphics are now prefixed with `iD-`
Also includes support for sending the preset logos to taginfo
2018-06-08 16:06:46 -04:00
Bryan Housel
2e2b037e36 Move a bunch of commonly used vector and projection math functions into geo
- geoVecAdd
- geoVecSubtract
- geoVecScale
- geoZoomToScale
- geoScaleToZoom
2017-12-18 15:05:42 -05:00
Bryan Housel
3d13620705 Convert lodah-es and d3 to named imports for ui 2017-09-26 11:22:43 -04:00
Bryan Housel
d8237fa3eb Variable names, fix edge avoidance, tooltips placement, RTL 2017-02-18 15:42:54 -05:00
Bryan Housel
9d660076ca Add title to editmenu tooltip 2017-02-17 15:47:41 -05:00
Kushan Joshi
ca25a34987 semver compliance for edit_menu 2017-02-09 13:03:12 +05:30
Kushan Joshi
734f40c2a8 fix tooltip overflow 2017-02-09 12:53:10 +05:30
Kushan Joshi
11d7cc7b34 white theme for edit_menu.js 2017-02-09 12:53:10 +05:30
Kushan Joshi
5b92b90ced Add context menu 2017-02-09 12:53:10 +05:30