Commit Graph

65 Commits

Author SHA1 Message Date
Bryan Housel
2f6004fcfa performance tuning work-in-progress
* store entity's matched features in a graph transient
* replace fn calls to get commonly used _keys and _hidden arrays
* replace lodash calls with faster for loops (in some places)
* always pass graph/resolver as a param
2014-11-05 00:27:14 -05:00
Bryan Housel
dcc9812986 prevent most operations on things connected to hidden features.. 2014-10-28 21:37:02 -04:00
Bryan Housel
874a3e2ad6 disable Move and Rotate operations if area < 80% contained in the viewport
see #542.
Also included:
1. DRY up code for "% contained in" extent testing.
2. If action.disabled() returns a better reason, show that instead of the too_large one.
2014-07-11 17:11:50 -04:00
John Firebaugh
f5b29989f5 Deselect before deleting an entity
This avoids errors produced by attempts to generate turns for
ways that were just deleted.
2014-05-18 16:02:46 -07:00
Bryan Housel
33782a3958 Require 2 uniq points for circularize. Handle 2 point case, where D3 centroid() fails. 2014-04-21 23:29:25 -04:00
Bryan Housel
1df54a700a Disable circularize and orthogonalize operations when way is <80% contained in the viewport 2014-03-27 22:47:34 -04:00
tyr
90fd8b6e51 disable merge operation if at least one relation is incomplete
Incomplete multipolygons were harmed in the merge operation (which
relies on completely loaded relations to determine inner/outer
status for example).

This disables the operation and adds an appropriate tooltip.
2014-02-09 18:41:31 +01:00
tyr
bde045d30c allow the rotate operation also for closed multipolygon members
closes #1718
2014-01-15 10:50:49 -08:00
John Firebaugh
1e78ee5c87 Stricter jshint 2013-10-24 16:08:48 -07:00
tyr
e8d637f2bb Add iD.geo.sphericalDistance
iD.geo.euclideanDistance should only be used for calculations of 
projected coordinates or display (pixel) coordinates.

iD.geo.sphericalDistance calculates approximate geographical 
distances, accounting for distortions at higher latitudes. This 
can be used for determining the nearest node (operations.Delete,
actions.Circularize) or relative length comparisons (actions.Split).
2013-09-29 07:45:04 -07:00
John Firebaugh
690a04e538 Make straighten/orthogonalize act like a single operation
- Display only one or the other in the radial menu
- Rename "Orthogonalize" to "Square"
- Use "S" as shortcut for both

Refs #1839
2013-09-25 14:26:30 -07:00
Paul Mach
b8efb00cfc Add straighten way operation and action 2013-09-20 12:14:16 -07:00
John Firebaugh
a32ce33238 Add Way#affix 2013-08-30 13:59:29 -07:00
John Firebaugh
8a215cac81 Add "Continue" operation 2013-08-28 09:30:28 -07:00
John Firebaugh
b52eb9ce72 Change delete shortcut to ⌘⌫/Ctrl-Backspace
Refs #1698
2013-08-21 15:50:55 -07:00
John Firebaugh
ccf2491bdd Fix error when deleting a triangle vertex
Fixes #1712
2013-08-21 15:25:51 -07:00
John Firebaugh
8feb53358c Fix unknown entity error on merge (fixes #1618) 2013-06-28 15:46:10 -04:00
John Firebaugh
21fa8c9c5d Prevent merging over restriction relations (#1512) 2013-06-18 14:25:10 -07:00
John Firebaugh
9ab0603052 Improve tooltip when merging to a multipolygon (fixes #1577) 2013-06-06 12:23:54 -07:00
John Firebaugh
a84a3364cc selection -> selectedIDs
Overloading "selection" is a bad idea.
2013-06-03 15:48:03 -07:00
John Firebaugh
fc692d8707 When deleting a vertex, reselect another vertex if possible
Fixes #1457.
2013-05-31 17:36:08 -07:00
John Firebaugh
1e8052182d Merge pull request #1247 from systemed/create-multipolygon
ability to create multipolygons
2013-05-28 16:56:22 -07:00
John Firebaugh
2e4207f99b Cache geometry 2013-05-17 15:31:27 -07:00
John Firebaugh
da9602795c Don't allow deleting incomplete relations
This will fail with an "entity not found" error.
2013-05-16 16:43:41 -07:00
Tom MacWright
f091237b70 JSHint fixes 2013-04-15 12:59:29 -04:00
Ansis Brammanis
62ee84c1a2 ability to create multipolygons 2013-04-03 10:56:14 -04:00
John Firebaugh
af7d003b88 Don't overload constructor parameters 2013-04-01 15:58:10 -07:00
John Firebaugh
79404c47d9 Multiselect control over disconnection (#1220) 2013-04-01 15:46:13 -07:00
John Firebaugh
93dd4a2658 Multiselect vertex/way to control splitting 2013-03-29 15:32:19 -07:00
John Firebaugh
b1daf85cfd Tooltips for disabled operations (fixes #573) 2013-03-29 12:29:07 -07:00
John Firebaugh
e89a6c9e3c Ensure radial menus closes after operation
https://app.getsentry.com/id/id/group/4233540/
2013-03-26 14:46:55 -07:00
Tom MacWright
5f9a4eeaba Merge pull request #1125 from porjo/orthotri
Orthogonalize three-node ways (addresses #1077)
2013-03-25 14:43:19 -07:00
John Firebaugh
70575a0f20 Go to browse mode after disconnecting (fixes #1121) 2013-03-25 10:15:28 -07:00
Ian B
c56aa25930 Orthogonalize three-node ways (addresses #1077) 2013-03-23 16:22:08 +01:00
Tom MacWright
29b6f34403 Prevent orthogonalization of <3 node ways. Fixes #776 2013-03-18 15:44:19 -04:00
John Firebaugh
68cc99c412 Disable Move operation on incomplete relations (fixes #972) 2013-03-11 16:43:06 -07: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
4e6a3c322f Merge branch 'master' of git://github.com/systemed/iD into rotate2
Conflicts:
	index.html
	test/index.html
2013-02-27 21:41:26 -05:00
Ansis Brammanis
404488c54a Fix a couple of rotate bugs 2013-02-27 21:38:40 -05:00
John Firebaugh
05de42b116 Go to browse mode after deleting (fixes #868) 2013-02-27 17:30:47 -08:00
John Firebaugh
78f6a00029 Fix moving multiple entities which share nodes
While here, implement moving multipolygons too.
2013-02-27 17:12:39 -08:00
Ian B
9f5564508f Add rotate shape operation (addresses #838) 2013-02-25 21:09:41 +01:00
Ansis Brammanis
7222fcb63f Move multiple elements 2013-02-23 20:06:37 -05:00
John Firebaugh
bd8c9d6a00 Support merging points into an area (#435) 2013-02-06 13:42:34 -08:00
John Firebaugh
d7639acb22 Set up iD.actions.Join to be more flexible 2013-02-06 13:42:34 -08:00
Dr Ian
b912097ee4 Tidy up: fix indents, spaces etc.
- Update orthogonalize to match new circularize.
- Add orthoganalize to test index.html
- Revert whitespace on index.html
2013-02-03 20:12:04 +01:00
Dr Ian
90aa734f53 Merge remote branch 'upstream/master' 2013-02-03 07:40:07 +01:00
John Firebaugh
b08722fd3f Pass just the projection to Circularize 2013-02-02 19:59:05 -05:00
John Firebaugh
1de05b518d Select result when splitting or joining ways
Fixes #601.
Fixes #603.
2013-02-02 19:47:56 -05:00
Dr Ian
8b6bb964ad Added orthogonalize function (square corners) 2013-02-02 23:52:16 +01:00