Commit Graph

40 Commits

Author SHA1 Message Date
Bryan Housel
aa24891428 In wireframe mode, draw points like vertices (closes #2591) 2015-04-20 22:33:32 -04:00
Bryan Housel
dfe8fd1e90 features performance enhancements
1. reusue entity.geometry where possible
2. cache entity parents
2014-11-18 22:05:08 -05:00
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
094db692ea Don't include hidden vertices in drawHover 2014-10-28 21:37:03 -04:00
Bryan Housel
b289c4d345 Set vertex attributes on update selection not enter (re: 01ca07f) 2014-06-26 16:47:58 -04:00
Bryan Housel
01ca07ff0c Compute vertex icons at all zooms (fixes #2249)
(before they got created without an icon if they enter() at zoom 16)
2014-06-25 16:40:50 -04:00
John Firebaugh
8323c948a7 jshint fixes 2013-10-24 15:33:52 -07:00
John Firebaugh
a853de7b87 Fix vertex showing on hover 2013-06-03 16:43:41 -07:00
John Firebaugh
a84a3364cc selection -> selectedIDs
Overloading "selection" is a bad idea.
2013-06-03 15:48:03 -07:00
John Firebaugh
1cfeba3da4 Don't draw offscreen vertices (fixes #1494) 2013-05-16 15:28:50 -07:00
John Firebaugh
fdc5824c5a Simplify 2013-05-16 15:28:50 -07:00
John Firebaugh
544c493eba Cache isIntersection 2013-05-13 22:40:43 -07:00
John Firebaugh
70e5411114 Optimize vertex rendering
* Cache icon
* Append rather than insert
* Do fewer things on update
* Don't create a fill unless needed
* Don't apply tag and member classes (never used)
* Drop down to raw setAttribute (d3 is slow :trollface:)
2013-05-13 09:37:48 -07:00
John Firebaugh
578224bd63 Optimize hover behavior
Add entity IDs to the element class list, so that specific
elements can be selected by ID rather than needing `filter`.
2013-05-12 09:40:34 -07:00
John Firebaugh
86988a09a3 Fix vertex rendering 2013-04-25 15:43:16 -07:00
John Firebaugh
7d66e03c0b Redraw hovered vertices more efficiently (#1377) 2013-04-25 13:53:31 -07: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
78aee5b6aa Fix tests 2013-04-23 20:09:36 -07:00
John Firebaugh
265c059407 Always display intersections 2013-04-23 17:31:32 -07:00
John Firebaugh
d0e53a7070 Fix child calculation 2013-04-23 16:52:33 -07:00
John Firebaugh
a2f86154ce Also show vertices on hover in draw modes 2013-04-23 16:52:32 -07:00
John Firebaugh
66551ba903 Show vertices only for selected way (#1022) 2013-04-23 16:52:02 -07:00
Tom MacWright
93104c268f Fix jshint errors 2013-03-26 12:20:51 -04:00
John Firebaugh
5cbda264f8 Fix vertex rendering 2013-03-14 15:08:08 -07:00
John Firebaugh
51a217caa2 Refine tagged vertex rendering
Don't render tagged vertices for which we don't have
an icon as the 'marker' icon. Marker shape is for points.
2013-03-14 13:35:24 -07:00
John Firebaugh
3787185182 Rendering tagged points
At z16 and below, tagged points are rendered with a small
dot in the center. At z17 and above, they are rendered with
a maki icon.

See the test rendering page for examples.

Fixes #381.
2013-03-13 17:31:25 -07:00
John Firebaugh
cb59453fcd Make vertex shadow slightly smaller
It's getting in the way too often.
2013-03-07 10:33:10 -08:00
John Firebaugh
787e76dbd1 Fix snapping after moving (fixes #880) 2013-03-01 10:41:55 -08:00
Ansis Brammanis
97ab739f1b Update bound data for all elements of points, vertices 2013-02-11 11:00:45 -05:00
John Firebaugh
c9fb1444db Connect via drag and drop
Fixes #598.
2013-02-04 16:48:54 -08:00
Saman Bemel-Benrud
5764012b23 better styles for map features. 2013-02-04 19:37:10 -05:00
Ansis Brammanis
2fa48df9a1 Small parentWays, parentRelations perf improvements 2013-01-30 16:09:15 -05:00
Tom MacWright
32ea30c3fb Use isPoi for determining whether points are pois or not 2013-01-23 19:14:54 -05:00
John Firebaugh
fce209131a Improve vertex rendering 2013-01-20 11:37:14 -08:00
John Firebaugh
3eaf4a46e0 Add CSS classes for relation memberships
An entity that is a member of a relation will have the classes
`member`, `member-role-<member role>`, and `member-type-<relation type>`.

The first use of these classes is to avoid filling multipolygon
member areas.
2013-01-17 15:17:40 -08:00
John Firebaugh
9f1506af5e Always use rounded projection 2013-01-17 11:57:29 -08:00
Tom MacWright
199584fbff Name drawing functions so we can profile them 2013-01-16 13:54:36 -05:00
John Firebaugh
e95d163dbc Apply tag classes to vertices and points
While here, introduce a `classed` matcher for Chai.
2013-01-11 12:22:23 -08:00
John Firebaugh
577398ca21 Fix .shared classing
Now that Graph#parentWays is cached, the specialized Graph#parentStructure
method is no longer necessary.

This commit also demonstrates that it's relatively easy to write specs for
rendering now!
2013-01-11 11:56:37 -08:00
John Firebaugh
6aa43f44d0 Split map rendering into some components 2013-01-11 07:04:40 -08:00