diff --git a/spec/index.html b/spec/index.html index a68feeefe..ad1549cf1 100644 --- a/spec/index.html +++ b/spec/index.html @@ -19,6 +19,7 @@ + + + diff --git a/spec/suites/RememberOpacity.js b/spec/suites/RememberOpacity.js new file mode 100644 index 000000000..bb023a59f --- /dev/null +++ b/spec/suites/RememberOpacity.js @@ -0,0 +1,151 @@ +describe('Remember opacity', function () { + var map, div, clock, markers; + + var markerDefs = [ + {latLng: [ 0, 0], opts: {opacity: 0.9}}, + {latLng: [ 0, 1], opts: {opacity: 0.5}}, + {latLng: [ 0,-1], opts: {opacity: 0.5}}, + {latLng: [ 1, 0], opts: {opacity: 0.5}}, + {latLng: [-1, 0], opts: {opacity: 0.5}}, + {latLng: [ 1, 1], opts: {opacity: 0.2}}, + {latLng: [ 1,-1], opts: {opacity: 0.2}}, + {latLng: [-1, 1], opts: {opacity: 0.2}}, + {latLng: [-1,-1], opts: {opacity: 0.2}} + ]; + + var bounds = L.latLngBounds( L.latLng( -1.1, -1.1), + L.latLng( 1.1, 1.1) ); + + beforeEach(function () { + clock = sinon.useFakeTimers(); + + div = document.createElement('div'); + div.style.width = '200px'; + div.style.height = '200px'; + document.body.appendChild(div); + + map = L.map(div, { maxZoom: 18 }); + + markers = []; + for (var i=0; i