small updates to Google layer and EventPane -- Google needs to @requires EventPane and not Layer, some minor stylistic changes to EventPane, updating tests so they will pass.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1211 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -6,22 +6,23 @@
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Layer.js
|
||||
* @requires OpenLayers/Util.js
|
||||
*/
|
||||
OpenLayers.Layer.EventPane = Class.create();
|
||||
OpenLayers.Layer.EventPane.prototype = Object.extend(new OpenLayers.Layer, {
|
||||
OpenLayers.Layer.EventPane.prototype =
|
||||
Object.extend(new OpenLayers.Layer, {
|
||||
|
||||
/** EventPaned layers are always base layers, by necessity.
|
||||
* @type Boolean
|
||||
*/
|
||||
*
|
||||
* @type Boolean */
|
||||
isBaseLayer: true,
|
||||
|
||||
/** EventPaned layers are fixed by default.
|
||||
* @type Boolean
|
||||
*/
|
||||
*
|
||||
* @type Boolean */
|
||||
isFixed: true,
|
||||
|
||||
/**
|
||||
* @type HTMLDOMElement
|
||||
*/
|
||||
/** @type DOMElement */
|
||||
pane: null,
|
||||
|
||||
/**
|
||||
@@ -31,8 +32,9 @@ OpenLayers.Layer.EventPane.prototype = Object.extend(new OpenLayers.Layer, {
|
||||
* @param {Object} options Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function(name, options) {
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
|
||||
|
||||
if (arguments.length > 0) {
|
||||
OpenLayers.Layer.prototype.initialize.apply(this, arguments);
|
||||
if (this.pane == null) {
|
||||
this.pane = OpenLayers.Util.createDiv();
|
||||
this.pane.style.width = "100%";
|
||||
@@ -50,6 +52,7 @@ OpenLayers.Layer.EventPane.prototype = Object.extend(new OpenLayers.Layer, {
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Layer.prototype.setMap.apply(this, arguments);
|
||||
|
||||
this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
|
||||
this.pane.style.display = this.div.style.display;
|
||||
if (this.isFixed) {
|
||||
@@ -66,6 +69,7 @@ OpenLayers.Layer.EventPane.prototype = Object.extend(new OpenLayers.Layer, {
|
||||
*/
|
||||
setVisibility: function(visible, noEvent) {
|
||||
OpenLayers.Layer.prototype.setVisibility.apply(this, arguments);
|
||||
|
||||
this.pane.style.display = this.div.style.display;
|
||||
},
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ if (typeof GMap2 != "undefined") {
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Layer.js
|
||||
* @requires OpenLayers/EventPane.js
|
||||
*/
|
||||
OpenLayers.Layer.Google = Class.create();
|
||||
OpenLayers.Layer.Google.prototype =
|
||||
|
||||
Reference in New Issue
Block a user