From 65ae546fa0848a7ad05c2cc7a6f075af1ed45788 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Mon, 16 Dec 2013 19:04:07 -0500 Subject: [PATCH] make canvas be underneath svg by default --- debug/vector/vector2.html | 10 +++++----- dist/leaflet.css | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/debug/vector/vector2.html b/debug/vector/vector2.html index 6d649940..f6286dfc 100644 --- a/debug/vector/vector2.html +++ b/debug/vector/vector2.html @@ -24,16 +24,16 @@ var canvas = L.canvas(); - var path = L.polygon([ - [route, [[50.5, 30.5], [50.5, 40], [40, 40]]], - [[[20, 0], [20, 40], [0, 40]]] - ], {renderer: canvas}).addTo(map).bindPopup('Hello Canvas'); - var poly = L.polyline([ [[60, 30], [60, 50], [40, 50]], [[20, 50], [20, 70], [0, 70]] ], {color: 'red'}).addTo(map).bindPopup('Hello SVG'); + var path = L.polygon([ + [route, [[50.5, 30.5], [50.5, 40], [40, 40]]], + [[[20, 0], [20, 40], [0, 40]]] + ], {renderer: canvas}).addTo(map).bindPopup('Hello Canvas'); + var circle = L.circle([35, 0], 700000, {color: 'green', renderer: canvas}).addTo(map).bindPopup('Hello Circle'); var circleMarker = L.circleMarker([35, 30], {color: 'magenta', radius: 30}).addTo(map); diff --git a/dist/leaflet.css b/dist/leaflet.css index ae6385f9..1360e99c 100644 --- a/dist/leaflet.css +++ b/dist/leaflet.css @@ -66,6 +66,9 @@ .leaflet-marker-pane { z-index: 6; } .leaflet-popup-pane { z-index: 7; } +.leaflet-map-pane canvas { z-index: 1; } +.leaflet-map-pane svg { z-index: 2; } + .leaflet-vml-shape { width: 1px; height: 1px;