John Firebaugh
2c8bbd8985
Integrate new drag behaviors
2012-12-21 12:10:44 -08:00
John Firebaugh
2c40de62be
Add iD.behavior.drag
...
`iD.behavior.drag` is like `d3.behavior.drag`, with the following differences:
* The `origin` function is expected to return an [x, y] tuple rather than an
{x, y} object.
* The events are `start`, `move`, and `end`.
(https://github.com/mbostock/d3/issues/563 )
* The `start` event is not dispatched until the first cursor movement occurs.
(https://github.com/mbostock/d3/pull/368 )
* The `move` event has a `loc` and `dxdy` [x, y] tuple properties rather
than `x`, `y`, `dx`, and `dy` properties.
* The `end` event is not dispatched if no movement occurs.
* An `off` function is available that unbinds the drag's internal event handlers.
* Delegation is supported via the `delegate` function.
2012-12-21 12:10:43 -08:00
John Firebaugh
ab733f3de0
Test/fix inspector
2012-12-18 14:48:24 -08:00
John Firebaugh
b134e95dbc
Disable spec failing on Travis until I can debug it
2012-12-18 12:39:45 -08:00
John Firebaugh
d66915e356
Update mocha and include mocha-phantomjs fix
...
Fixes #289 , see:
https://github.com/metaskills/mocha-phantomjs/pull/30
https://github.com/visionmedia/mocha/pull/691
2012-12-15 09:37:06 -08:00
John Firebaugh
e627616603
Fix float comparison
2012-12-15 09:37:06 -08:00
John Firebaugh
ad0efa4931
Place -> Point
...
We decided to use geometric terms for the modes.
2012-12-14 14:39:38 -08:00
John Firebaugh
209b87f7e8
Extract MoveWay action
2012-12-13 17:39:07 -08:00
John Firebaugh
ee3f5cc768
Move -> MoveNode, in preparation for MoveWay
2012-12-13 17:39:07 -08:00
John Firebaugh
c37aa11408
Start testing modes
2012-12-13 17:39:06 -08:00
John Firebaugh
d192d8bed5
Smaller test data
2012-12-13 17:39:06 -08:00
John Firebaugh
c5dbebc063
Move keybinding to map
2012-12-13 17:39:06 -08:00
Tom MacWright
8e14a9a13c
Refactor geocoder into ui component, refactor clickoutside technique.
...
Fixes #251
2012-12-13 14:18:49 -05:00
Tom MacWright
9c0633d674
Update extent tests
2012-12-13 12:07:46 -05:00
Tom MacWright
d7f094a024
Remove 404 test because Travis can't handle it.
2012-12-13 12:06:47 -05:00
Tom MacWright
52d9227232
Rename add road to add line. Fixes #252
2012-12-13 12:06:12 -05:00
Tom MacWright
6b257d0d85
Update test for UI tweaks
2012-12-08 00:02:36 -05:00
Tom MacWright
01e696135d
Test for travis
2012-12-07 18:20:14 -05:00
Tom MacWright
50ef08c723
Test actual data parsing, add test data, more tests
2012-12-07 18:03:33 -05:00
Tom MacWright
adb8ab53ce
Update relation tests
2012-12-07 16:01:14 -05:00
John Firebaugh
d4832e2e95
Add closing segment of drawn areas ( fixes #217 )
2012-12-07 14:21:30 -05:00
John Firebaugh
c5c65ccdfd
Include difference in history change events
2012-12-07 12:35:57 -05:00
John Firebaugh
ea4b93d88b
Graph#difference
2012-12-07 12:35:57 -05:00
John Firebaugh
255e3aaabd
Modify Graph so it can track deleted ids
2012-12-07 12:32:24 -05:00
John Firebaugh
3e45afbc5e
Move history annotation to History#perform/replace
...
Actions are too low-level for annotations.
2012-12-07 10:35:39 -05:00
John Firebaugh
7eec007740
Get internal ID logic in one place
2012-12-07 10:32:51 -05:00
John Firebaugh
8854dac623
More action specs; fix ReverseWay
2012-12-06 19:16:54 -05:00
John Firebaugh
67ffd2e71b
Revert "Copy entity in Graph#fetch"
...
This reverts commit 12d02e0a6b .
2012-12-06 19:16:54 -05:00
John Firebaugh
9743ee282b
More mode and action overhaul
...
Pass entities to actions via id; this allows safe composition
of actions that modify the same entity.
Fix remaining ghost node cases (#213 ).
Create more logical undo states when drawing.
2012-12-06 18:39:51 -05:00
John Firebaugh
79e2d08c0d
StartWay -> AddWay (for parallelism with AddNode)
2012-12-06 18:36:03 -05:00
John Firebaugh
27af384a3f
Allow History#{perform,replace} to run multiple actions
2012-12-06 18:36:03 -05:00
John Firebaugh
4ee6e3ac1a
Remove duplicate intersection function
2012-12-06 14:22:33 -05:00
John Firebaugh
0e2889d5d6
Add freezing specs
2012-12-06 14:20:02 -05:00
John Firebaugh
6b08193125
Introduce Entity transients; fix #187
2012-12-06 14:11:45 -05:00
Tom MacWright
5c6c271394
Split background sources into background_source
2012-12-06 11:12:06 -05:00
Tom MacWright
b79c2f7ac2
Test background subdomains
2012-12-06 11:08:35 -05:00
Tom MacWright
3b79854399
Fix tests
2012-12-06 10:46:21 -05:00
Tom MacWright
731df3ce41
Test backgroundsource, favor not making object-functions.
2012-12-05 17:34:47 -05:00
John Firebaugh
077e5cc9ce
Rename various actions
2012-12-05 16:42:48 -05:00
John Firebaugh
5666cb774e
Finish iD.actions.DeleteWay ( fixes #72 )
2012-12-05 16:35:13 -05:00
John Firebaugh
812b427ac4
Split remove action into DeleteWay and DeleteNode
2012-12-05 16:14:39 -05:00
John Firebaugh
d26c8638b3
Allow Graph to be constructed with an array of entities
...
Useful for tests.
2012-12-05 16:14:39 -05:00
John Firebaugh
fa1b536ce7
Default relation members to empty array
2012-12-05 16:14:39 -05:00
John Firebaugh
33beb3d2f0
Split actions into separate files
2012-12-05 16:14:39 -05:00
John Firebaugh
4a3169bb1d
Test/refine iD.actions.remove
2012-12-05 16:14:39 -05:00
John Firebaugh
435be12529
Split modes into separate files
2012-12-05 12:52:26 -05:00
John Firebaugh
551a2df24e
Replace Entity.{lat,lon} with Entity.loc
...
Fixes #189
2012-12-05 09:48:00 -05:00
Tom MacWright
22fe35723f
Clean up, move stringQs to util
2012-12-04 18:28:22 -05:00
Tom MacWright
7828fa34c1
Test nodeIntersect
2012-12-04 18:24:55 -05:00
John Firebaugh
76849596f8
Move node removal into removeNodeWay action
2012-12-04 18:07:26 -05:00