Commit Graph

39 Commits

Author SHA1 Message Date
John Firebaugh 7e68e8e114 Add iD.Context
This is a facade interface that ties together a bunch of
different internal objects and will make it easier to write
tests for behaviors, modes, and operations.
2013-02-01 12:40:15 -05:00
John Firebaugh 2655810efe Remove unused parameter 2013-01-31 12:06:21 -05:00
John Firebaugh 7e8126ded9 I18n for modes and operations 2013-01-31 11:20:41 -05:00
Saman Bemel-Benrud 1b495870c0 grammar for tooltips, keybinding hints, other tooltip fixes. 2013-01-30 19:09:10 -05:00
John Firebaugh dbac370c71 More draw refactoring 2013-01-30 16:14:29 -05:00
John Firebaugh 859ae1c1cc DrawWay#cancel shouldn't unconditionally delete the way
Fixes #514.
2013-01-28 16:39:31 -05:00
John Firebaugh e09666bbdc Fixing draw mode bugs
Disabling interactive draw undo for now. I know how to fix it
but it's a bit tricky. So undo will just drop you out to browse
mode for the time being.

Fixes #477.
Fixes #516.
2013-01-26 15:24:14 -05:00
Tom MacWright deebe55182 Allow for continuing line drawing, also fixes #507 2013-01-25 16:28:21 -05:00
Tom MacWright 2527d57404 Simple map-tail minimalism. Fixes #467 2013-01-24 17:26:52 -05:00
John Firebaugh 18c7267010 Extract Draw behavior
Fixed some bugs but introduced others.
2013-01-24 17:00:48 -05:00
John Firebaugh 278bb4a51c Fix some cases where a degenerate way was created 2013-01-23 12:40:27 -05:00
John Firebaugh c263ebd4dc iD.util.geo => iD.geo 2013-01-22 18:20:20 -05:00
John Firebaugh 814c3608db Hook into undos in a different way
This way doesn't depend on details of keybindings and
the undo button.

Also, implement this in DrawArea mode.
2013-01-22 14:55:08 -05:00
John Firebaugh ff15aa8e7b Rewrite d3.keybinding
A keybinding now represents a set of key commands that can
be unbound as a set. Multiple keybindings are possible, and,
providing a namespace is provided to the constructor, will
not conflict with each other.

Also, key combination strings such as ⌘+A are now supported.
2013-01-22 14:55:08 -05:00
Tom MacWright 9a3d545f17 Do not focus text fields after initial placement 2013-01-22 14:42:21 -05:00
John Firebaugh 2e14a6b4de Unbind ⌘-Z when exiting DrawLine (fixes #455) 2013-01-22 09:49:38 -05:00
John Firebaugh 95800741fd Add some utility methods to Way 2013-01-18 14:44:29 -08:00
Tom MacWright fd2ef2a78b Rename tooltip to tail, use tail in modes. 2013-01-17 12:07:26 -05:00
Ansis Brammanis a9de2500aa Fix undo right after drawing line or area 2013-01-16 12:43:29 -05:00
Ansis Brammanis a980695ee7 Avoid creating lines with < 2 nodes (or areas < 3) 2013-01-16 12:20:35 -05:00
Ansis Brammanis ac8c12e7eb Remove double-undo when exiting drawLine mode 2013-01-13 19:55:08 -05:00
John Firebaugh 7dc1945ee3 accuracy-handle -> midpoint 2013-01-11 14:54:51 -08:00
Ansis Brammanis 87ee1cf0cb Select way/area after hitting enter/escape 2013-01-11 14:30:09 -05:00
Ansis Brammanis 46aff8d1ba Fix connecting a way to an accuracy handle 2013-01-11 12:00:02 -05:00
Ansis Brammanis 59bfe703fd Restrict zoom while drawing 2013-01-11 11:32:07 -05:00
Ansis Brammanis 3fdf32f4dd Add ctrl-z and make it work nicely with drawline 2013-01-11 10:20:34 -05:00
Ansis Brammanis bc53ae457e Fix undo while drawing 2013-01-09 17:44:20 -05:00
Ansis Brammanis f489117e5b highlight way or node that will be connected to 2013-01-09 17:22:08 -05:00
John Firebaugh e5d79d5270 Fix various line and area drawing bugs
The way and vertex being drawn get an `active` class,
which can be used to hide the vertex and set
`pointer-events: none` on the line.

Use the correct cursors when connecting (fixes #293).

Splice into existing lines at the correct index and
location (fixes #246).
2013-01-07 21:58:01 -08:00
John Firebaugh 2d3ce6c125 Extract hover behavior 2013-01-07 08:34:37 -08:00
Tom MacWright f5873a3bc1 Add .hoverEnable to map and disable it for drawing-related modes. Fixes #234 2013-01-02 14:29:04 -05:00
John Firebaugh 40a32de443 Hide select cursors when in draw modes (fixes #290) 2012-12-21 13:32:39 -08:00
Tom MacWright 811187620d jshint fixes 2012-12-18 10:47:32 -05:00
Saman Bemel-Benrud 8c364091a3 refining cursor behavior. 2012-12-14 19:54:55 -05:00
Tom MacWright 66f58ac96b Fix regressions in 9743ee282b - .hint() is
not meant to be chainable.
2012-12-14 13:42:53 -05:00
John Firebaugh ee3f5cc768 Move -> MoveNode, in preparation for MoveWay 2012-12-13 17:39:07 -08:00
John Firebaugh 150dcf471e Chain 2012-12-13 17:39:07 -08:00
John Firebaugh 304a9c3603 Add symbol for delete key 2012-12-13 17:39:07 -08:00
Tom MacWright 52d9227232 Rename add road to add line. Fixes #252 2012-12-13 12:06:12 -05:00