Commit Graph

168 Commits

Author SHA1 Message Date
Bryan Housel
1603b638f6 Add Copy/Paste behaviors, context copybuffer 2015-01-07 10:41:05 -05:00
Bryan Housel
de6d24f41a Don't exit mode when selected elements are gone until after a draw pass
(fixes #2476)
2014-12-15 16:08:01 -05:00
Bryan Housel
a3fc0d62e5 free radialMenu in exit (fixes #2477) 2014-12-15 10:10:52 -05:00
Bryan Housel
c74629ede8 handle relation selections, cleanup code,
closes #2469, #2470
2014-12-10 23:30:09 -05:00
Bryan Housel
ebaaa4ba5a Initialize radialMenu earlier
This prevents it from being undefined when exiting back to browse mode:
  in selectElements() (re 2024e233 crash if element id passed in url hash)
  in update() (possible re #2151?)
2014-11-19 00:18:39 -05:00
Bryan Housel
2024e2333d Exit select mode if selected DOM elements have disappeared 2014-11-10 23:23:28 -05:00
Bryan Housel
52903c509d iD.behavior.Hash handles selected id parameter
(this is better than having `iD.modes.Select` mess with `location.hash`)
2014-06-30 00:33:19 -04:00
Bryan Housel
a9d58fdf74 reenter browse mode in editOff when zoom < 16 (#2263) 2014-06-27 17:55:13 -04:00
John Firebaugh
1e78ee5c87 Stricter jshint 2013-10-24 16:08:48 -07:00
Aaron Lidman
ab1b6a508a Multiselection list UI 2013-10-15 18:30:30 -04:00
John Firebaugh
ecfe8ce943 Adjust the timing of localStorage saves
If localStorage writes were free, we'd want to just save
on every history change. Second best is to debounce the
write.

Writing on mode change is problematic; it sometimes happens
when not desired and sometimes doesn't happen when desired.

Fixes #1857.
2013-09-30 14:45:02 -07:00
John Firebaugh
4728622d87 Don't auto-save intro tutorial edits
Fixes #1745
Fixes #1795
2013-09-25 15:32:56 -07:00
John Firebaugh
34fdc8de42 Save history more frequently (#1345) 2013-08-14 16:50:10 -07:00
John Firebaugh
18829ee482 Fix radial menu tooltip positioning 2013-08-07 11:44:09 -07:00
John Firebaugh
9190a25220 Show only visible features in list 2013-06-17 15:44:14 -07:00
John Firebaugh
410e401b34 Don't show the inspector on multiselect (fixes #1600) 2013-06-17 14:47:12 -07:00
John Firebaugh
c68635062c Fix sidebar UI behaviors
* Restore preset search autofocus (fixes #1566)
* Should show hover in draw modes, not preset list
2013-06-03 16:28:30 -07:00
John Firebaugh
a84a3364cc selection -> selectedIDs
Overloading "selection" is a bad idea.
2013-06-03 15:48:03 -07:00
John Firebaugh
a97e61803c Refine selection behavior when dragging a node
* Preserve the sidebar state (fixes #1401)
* Show vertices of selected way (fixes #1478)
* Reselect exact previous selection when finished
2013-05-29 10:32:11 -07:00
John Firebaugh
884d2d0732 Add hover indicator in sidebar 2013-05-26 14:07:10 -07:00
John Firebaugh
bef4cd60a3 Convert constructor argument to accessor 2013-05-23 16:05:40 -07:00
John Firebaugh
5b69387ea0 Fix unknown entity error on delete 2013-05-14 17:23:06 -07:00
John Firebaugh
1455c5e551 Use entity ID selectors in more places 2013-05-13 12:29:29 -07:00
John Firebaugh
1641f38632 Use context.mouse() 2013-05-09 21:55:05 -07:00
John Firebaugh
bb487ba0ee Use fastMouse 2013-05-09 21:55:05 -07:00
John Firebaugh
08949d2fe9 Redo iD.geo.chooseIndex
It now calculates proper orthogonal projections and finds
the minimal one. Rename it iD.geo.chooseEdge and minimize
its coupling to context.

This version also copes with 0- and 1-node ways.

Fixes #1428.
2013-05-07 18:35:45 -07:00
John Firebaugh
24ecf2a697 Don't show radial menu after dragging node (fixes #1385) 2013-04-26 11:45:01 -07:00
John Firebaugh
e5dd800aff Allow selecting a relation 2013-04-26 11:34:24 -07:00
Ansis Brammanis
4e305ea773 don't permalink negative IDs (fixes #1374) 2013-04-25 11:16:56 -04:00
John Firebaugh
c50c3121d8 Make Graph#entity strict
Use Graph#hasEntity for the previous behavior.
2013-04-24 09:27:37 -07:00
John Firebaugh
71dda769f2 FF can't focus an SVG element 2013-04-12 11:24:25 -04:00
John Firebaugh
5dda54ea52 Refine focus behavior for inspector (fixes #1277)
Auto-focus the search field only right after finishing drawing.
At that point, the radial menu isn't shown anyway. So then the
flow for correcting geometry before assigning a preset is:

 1. Draw.
 2. Finish drawing. The search field is focused, and no
    radial menu is open.
 3. Click again to reselect the feature and show menu.
    Now the search field is blurred.

In other words: when the menu is shown, search should not be
focused. When search is focused, the menu should not be shown.
2013-04-12 10:08:44 -04:00
Ansis Brammanis
a8cf59e21c simplify 2013-04-05 13:31:08 -04:00
Ansis Brammanis
d7cc24b935 shadows for multipolygons 2013-04-05 12:11:23 -04:00
Ansis Brammanis
3ad94406cb fix multi-select regression 2013-04-02 16:54:08 -04:00
Ansis Brammanis
a4d7b20027 Don't try to select non-multipolygon relations 2013-04-02 16:23:40 -04:00
Ansis Brammanis
d573d42ebe Revert "don't try to select relations"
This reverts commit 5c15a180a3.
2013-04-02 16:00:39 -04:00
Ansis Brammanis
5c15a180a3 don't try to select relations 2013-04-02 15:42:35 -04:00
Ansis Brammanis
0c5424aa3f re-add 'selected' class after each redraw
Performance seems to be fine, but we could move this into
svg/* and only run it on entering elements.

fix #1236
2013-04-02 13:51:32 -04:00
John Firebaugh
b1daf85cfd Tooltips for disabled operations (fixes #573) 2013-03-29 12:29:07 -07:00
John Firebaugh
fdcb96e8d6 Move more inspector logic to Inspector 2013-03-17 20:07:44 -07:00
John Firebaugh
13b5cc4c4d Move inspector logic to Inspector 2013-03-17 19:54:47 -07:00
John Firebaugh
cb12b184c0 Pass entity explicitly 2013-03-17 19:38:38 -07:00
Tom MacWright
4b68f8f7ef Refactor preset grid, add fancier transition for inspector enter 2013-03-15 15:28:32 -04:00
John Firebaugh
66e1bdb47d Show tag editor for untagged entities that aren't new
Fixes #991.
2013-03-14 15:59:56 -07:00
John Firebaugh
9f5ba8342d Convert DragNode to a mode
This makes the CSS more consistent and makes fixing #953
easier. Also, dragging now clears the selection and closes
any operations menu, which is good.

There's still a minor Chrome bug: it doesn't refresh the
cursor when the .behavior-hover class is removed.
2013-03-11 15:45:27 -07:00
Ansis Brammanis
8406b7de80 use capture for esc in select mode
so that the mode can be escaped even if
a text input is focused
2013-03-10 21:27:49 -04:00
John Firebaugh
988bfeb767 Support both delete and backspace (fixes #887)
Also show correct key in operation tooltip.
2013-03-04 17:12:44 -08:00
Ansis Brammanis
44079759a6 untie showing grid and showing radial menu 2013-03-04 00:42:02 -05:00
John Firebaugh
b09bc8cfa2 Extract selection reference 2013-03-01 10:30:12 -08:00