Skip to content

Commit

Permalink
Confusing use of '!'.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Mar 19, 2012
1 parent 20e35b1 commit 5557693
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/OpenLayers/Control/OverviewMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
*/
draw: function() {
OpenLayers.Control.prototype.draw.apply(this, arguments);
if(!(this.layers.length > 0)) {
if (this.layers.length === 0) {
if (this.map.baseLayer) {
var layer = this.map.baseLayer.clone();
this.layers = [layer];
Expand Down
3 changes: 1 addition & 2 deletions lib/OpenLayers/Layer/EventPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
var moOldZoom = this.getMapObjectZoom();
var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom);

if ( !(newCenter.equals(oldCenter)) ||
!(newZoom == oldZoom) ) {
if (!(newCenter.equals(oldCenter)) || newZoom != oldZoom) {

if (!zoomChanged && oldCenter && this.dragPanMapObject &&
this.smoothDragPan) {
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenLayers/Request.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ OpenLayers.Request = {
* will be the same as the provided url.
*/
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);
if (urlParts) {
var location = window.location;
Expand Down

0 comments on commit 5557693

Please sign in to comment.