Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vectors 2.0 #2290

Merged
merged 63 commits into from
Dec 18, 2013
Merged
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
568fd15
initial Renderer/SVG implementations
mourner Dec 12, 2013
076255f
initial working Path/Polyline implementation
mourner Dec 12, 2013
3c8dd35
manage renderer automatically
mourner Dec 12, 2013
eade171
fix renderers not updating bounds before path updates
mourner Dec 12, 2013
33f4e72
add working Polygon implementation
mourner Dec 12, 2013
7cd67ed
copy Rectangle implementation
mourner Dec 12, 2013
d983464
SVG bringToFront and bringToBack
mourner Dec 12, 2013
d3426d5
fix Polygon getBounds and factory
mourner Dec 12, 2013
f3b376f
add Path setStyle
mourner Dec 12, 2013
cea35a3
add SVG mouse events support
mourner Dec 12, 2013
274e155
fix "error parsing z" error in SVG
mourner Dec 12, 2013
1bd0ee2
SVG.js minor cleanup
mourner Dec 12, 2013
3c5cf0f
fix stroke appearing on polygon clip edges
mourner Dec 12, 2013
7976b1f
add basic Canvas implementation
mourner Dec 12, 2013
b19fd8d
proper Canvas redraw & setStyle
mourner Dec 12, 2013
919b862
add MultiPolyline and MultiPolygon implementations
mourner Dec 12, 2013
48a3c34
add Path Popup implementation
mourner Dec 13, 2013
b2eee96
remove MultiPoly classes (unnecessary)
mourner Dec 13, 2013
5d8e727
remove vector stuff that's already ported
mourner Dec 13, 2013
08028b7
add VML implementation (not tested yet)
mourner Dec 13, 2013
6aa605f
clean up lineJoin/lineCap
mourner Dec 13, 2013
6543fe5
fix jshint errors
mourner Dec 13, 2013
ddb9a37
flatten poly latlngs into rings, proper clipping
mourner Dec 13, 2013
41a576b
minor clean up
mourner Dec 13, 2013
6f9d05f
implement Canvas events and SVG click-through
mourner Dec 13, 2013
fd98197
require ctx in DomEvent off if on had it (breaking!!!)
mourner Dec 13, 2013
1e04f5f
add Circle implementation
mourner Dec 13, 2013
21510e6
add CircleMarker
mourner Dec 13, 2013
2ac8986
minor clean up
mourner Dec 13, 2013
d0eedd3
rename vectors2 folder into vectors, update deps
mourner Dec 13, 2013
04addb7
fix choosing default renderer
mourner Dec 13, 2013
87bf1ff
fix GeoJSON deps
mourner Dec 13, 2013
dc5151b
fix GeoJSON roundtripping
mourner Dec 13, 2013
33e23a6
fix specs for polygon holes
mourner Dec 13, 2013
05054a1
fix Popup regression
mourner Dec 13, 2013
e35095f
fix CircleMarker setStyle
mourner Dec 13, 2013
674d9ae
Retina support and better default renderer handling
mourner Dec 13, 2013
f045742
add Polyline and Polygon getCenter, openPopup in centroid
mourner Dec 13, 2013
4e33ce3
cache getBounds and optimize Canvas events
mourner Dec 13, 2013
46c279c
various IE vectors fixes
mourner Dec 13, 2013
fdae94c
fix test with empty polyline
mourner Dec 13, 2013
fe5cd4b
tweaks to renderer instancing
mourner Dec 14, 2013
508a75f
make Circle inherit from CircleMarker and not the other way
mourner Dec 14, 2013
518b82b
fix GeoJSON resetStyle in case no style was specified
mourner Dec 14, 2013
2e9141f
better style defaults for vector features
mourner Dec 14, 2013
f750b76
fix addLatLng not affecting bounds
mourner Dec 16, 2013
f4f8c06
fix adding/removal of vectors and renderers
mourner Dec 16, 2013
f930588
simpler Circle._containsPoint, remove accidental debug
mourner Dec 16, 2013
7bffd49
do stroke hit detection after polygon
mourner Dec 17, 2013
65ae546
make canvas be underneath svg by default
mourner Dec 17, 2013
eca9fe9
fix retina canvas redraw bug
mourner Dec 17, 2013
811006a
cache circle bounds
mourner Dec 17, 2013
e5d1ff6
fix dragging on canvas layer
mourner Dec 17, 2013
988dc3a
redraw partially when updating canvas layers (massive speedup)
mourner Dec 17, 2013
f2af995
tweak default vectors color
mourner Dec 17, 2013
95e394f
fix mouse handling regression in Path
mourner Dec 18, 2013
4d8990f
dry up the renderer code a bit
mourner Dec 18, 2013
b329c4a
only round clip edges, other path points already rounded
mourner Dec 18, 2013
cf55d0e
clean up Renderer/SVG code and add comments
mourner Dec 18, 2013
5d4e776
fix PolyUtil spec (we now round poly clipping)
mourner Dec 18, 2013
511cbd5
add more comments to Canvas, fix dragging cursors
mourner Dec 18, 2013
9cc1b36
more comments in new vector code
mourner Dec 18, 2013
9de557d
update changelog about vectors 2.0
mourner Dec 18, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simpler Circle._containsPoint, remove accidental debug
  • Loading branch information
mourner committed Dec 18, 2013
commit f930588bca4cab80bf4663a9a6b3cf1ec5d98f86
8 changes: 1 addition & 7 deletions src/layer/vector/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ L.Canvas = L.Renderer.extend({
},

_initPath: function (layer) {
if (!layer._updatePath) {
debugger;
}
this.on('redraw', layer._updatePath, layer);

if (layer.options.clickable) {
Expand Down Expand Up @@ -239,8 +236,5 @@ L.Polygon.prototype._containsPoint = function (p) {
};

L.Circle.prototype._containsPoint = function (p) {
var center = this._point,
w = this._clickTolerance();

return (p.distanceTo(center) <= this._radius + w);
return p.distanceTo(this._point) <= this._radius + this._clickTolerance();
};