From 6ff86dc756edb7100e8669c202a396f23edcd484 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 29 Feb 2008 05:59:43 +0000 Subject: [PATCH] Checking for properties directly on the prototype since it has been extended already. r=crschmidt (closes #1405) git-svn-id: http://svn.openlayers.org/trunk/openlayers@6410 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control/NavigationHistory.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Control/NavigationHistory.js b/lib/OpenLayers/Control/NavigationHistory.js index 49cd9cd725..1989f69662 100644 --- a/lib/OpenLayers/Control/NavigationHistory.js +++ b/lib/OpenLayers/Control/NavigationHistory.js @@ -113,7 +113,7 @@ OpenLayers.Control.NavigationHistory = OpenLayers.Class(OpenLayers.Control, { * before callilng restore and set to false after restore returns. */ restoring: false, - + /** * Constructor: OpenLayers.Control.NavigationHistory * @@ -139,18 +139,14 @@ OpenLayers.Control.NavigationHistory = OpenLayers.Class(OpenLayers.Control, { trigger: OpenLayers.Function.bind(this.previousTrigger, this), displayClass: this.displayClass + "Previous" }; - if(options) { - OpenLayers.Util.extend(previousOptions, options.previousOptions); - } + OpenLayers.Util.extend(previousOptions, this.previousOptions); this.previous = new OpenLayers.Control.Button(previousOptions); var nextOptions = { trigger: OpenLayers.Function.bind(this.nextTrigger, this), displayClass: this.displayClass + "Next" }; - if(options) { - OpenLayers.Util.extend(nextOptions, options.nextOptions); - } + OpenLayers.Util.extend(nextOptions, this.nextOptions); this.next = new OpenLayers.Control.Button(nextOptions); },