Fixing erroneously set default for right-click handlers. Thanks to senior schmidt for pointing out this oversight on my part, and for the quick reviw. (Pullup #1735)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8021 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-09-16 16:23:43 +00:00
parent 658953b130
commit 01682a6da7
2 changed files with 4 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
* APIProperty: handleRightClicks * APIProperty: handleRightClicks
* {Boolean} Whether or not to handle right clicks. Default is false. * {Boolean} Whether or not to handle right clicks. Default is false.
*/ */
handleRightClicks: true, handleRightClicks: false,
/** /**
* Constructor: OpenLayers.Control.Navigation * Constructor: OpenLayers.Control.Navigation

View File

@@ -4,7 +4,7 @@
<script type="text/javascript"> <script type="text/javascript">
function test_Control_Navigation_constructor (t) { function test_Control_Navigation_constructor (t) {
t.plan( 2 ); t.plan( 3 );
var temp = OpenLayers.Control.prototype.initialize; var temp = OpenLayers.Control.prototype.initialize;
OpenLayers.Control.prototype.initialize = function() { OpenLayers.Control.prototype.initialize = function() {
t.ok(true, "OpenLayers.Control's constructor called"); t.ok(true, "OpenLayers.Control's constructor called");
@@ -13,6 +13,8 @@
var control = new OpenLayers.Control.Navigation(); var control = new OpenLayers.Control.Navigation();
t.ok( control instanceof OpenLayers.Control.Navigation, "new OpenLayers.Control returns object" ); t.ok( control instanceof OpenLayers.Control.Navigation, "new OpenLayers.Control returns object" );
t.ok( !control.handleRightClicks, "'handleRightClicks' property is disabled by default");
OpenLayers.Control.prototype.initialize = temp; OpenLayers.Control.prototype.initialize = temp;
} }