Confusing use of '!'.
This commit is contained in:
@@ -202,7 +202,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
*/
|
*/
|
||||||
draw: function() {
|
draw: function() {
|
||||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||||
if(!(this.layers.length > 0)) {
|
if (this.layers.length === 0) {
|
||||||
if (this.map.baseLayer) {
|
if (this.map.baseLayer) {
|
||||||
var layer = this.map.baseLayer.clone();
|
var layer = this.map.baseLayer.clone();
|
||||||
this.layers = [layer];
|
this.layers = [layer];
|
||||||
|
|||||||
@@ -255,8 +255,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
|
|||||||
var moOldZoom = this.getMapObjectZoom();
|
var moOldZoom = this.getMapObjectZoom();
|
||||||
var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom);
|
var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom);
|
||||||
|
|
||||||
if ( !(newCenter.equals(oldCenter)) ||
|
if (!(newCenter.equals(oldCenter)) || newZoom != oldZoom) {
|
||||||
!(newZoom == oldZoom) ) {
|
|
||||||
|
|
||||||
if (!zoomChanged && oldCenter && this.dragPanMapObject &&
|
if (!zoomChanged && oldCenter && this.dragPanMapObject &&
|
||||||
this.smoothDragPan) {
|
this.smoothDragPan) {
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ OpenLayers.Request = {
|
|||||||
* will be the same as the provided url.
|
* will be the same as the provided url.
|
||||||
*/
|
*/
|
||||||
makeSameOrigin: function(url, proxy) {
|
makeSameOrigin: function(url, proxy) {
|
||||||
var sameOrigin = !(url.indexOf("http") == 0);
|
var sameOrigin = url.indexOf("http") !== 0;
|
||||||
var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);
|
var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);
|
||||||
if (urlParts) {
|
if (urlParts) {
|
||||||
var location = window.location;
|
var location = window.location;
|
||||||
|
|||||||
Reference in New Issue
Block a user