Making sketch handlers work over the dateline by using layer.getLonLatFromViewPortPx instead of map.getLonLatFromPixel. Thanks bartvde for the unit and acceptance tests. r=bartvde (closes #2787)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -3,12 +3,14 @@
|
||||
<script src="../OLLoader.js"></script>
|
||||
<script type="text/javascript">
|
||||
function test_ctor_draw(t) {
|
||||
t.plan(4);
|
||||
t.plan(5);
|
||||
var map = new OpenLayers.Map('map');
|
||||
var vLayer = new OpenLayers.Layer.Vector();
|
||||
map.addLayer(vLayer);
|
||||
|
||||
var editingToolbar = new OpenLayers.Control.EditingToolbar(vLayer);
|
||||
var editingToolbar = new OpenLayers.Control.EditingToolbar(vLayer, {
|
||||
citeCompliant: "foo"
|
||||
});
|
||||
map.addControl(editingToolbar);
|
||||
|
||||
t.ok(editingToolbar instanceof OpenLayers.Control.EditingToolbar,
|
||||
@@ -19,6 +21,7 @@
|
||||
"First control is active" );
|
||||
t.eq(editingToolbar.controls.length, 4,
|
||||
"EditingToolbar contains 4 Controls" );
|
||||
t.eq(editingToolbar.controls[1].handler.citeCompliant, "foo", "citeCompliant option passed to handler correctly")
|
||||
|
||||
map.destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user