Skip to content

Commit

Permalink
Beautifying the containers
Browse files Browse the repository at this point in the history
  • Loading branch information
mithron committed Aug 22, 2014
1 parent 954743d commit 279c59d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
23 changes: 21 additions & 2 deletions src/leaflet.locationlist.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
.leaflet-bar .leaflet-control-locationlist-arrow-next {
.leaflet-control-locationlist-arrow-next {
background-image: url('../img/icon-next.png');
float: left;
border-top-left-radius: 0px !important;
border-bottom-left-radius: 0px !important;
border-top-right-radius: 4px !important;
border-bottom-right-radius: 4px !important; }
.leaflet-bar .leaflet-control-locationlist-arrow-prev {
.leaflet-control-locationlist-arrow-prev {
background-image: url('../img/icon-prev.png');
float: left;
border-top-left-radius: 4px !important;
border-bottom-left-radius: 4px !important;
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
.leaflet-control-locationlist {
background-color : transparent;
text-align:center;
}
.leaflet-control-locationlist-arrows {
background-color : rgba(0,0,0,0);
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
display:inline-block;
}

.leaflet-control-locationlist-form {
background-color : rgba(0,0,0,0);
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}

.leaflet-control-locationlist-fullist {
border-radius: 4px;
}
12 changes: 6 additions & 6 deletions src/leaflet.locationlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ L.Control.LocationList = L.Control.extend({

var className = 'leaflet-control-locationlist', container;

container = this._contentContainer = L.DomUtil.create('div', 'leaflet-bar');
container = this._contentContainer = L.DomUtil.create('div', className);

this._currentLocation_index = 0;

arrowsContainer = L.DomUtil.create('div', className + '-arrows leaflet-bar', container);

this._prevButton = this._createButton(this.options.prevText, this.options.prevTitle,
className + '-arrow-prev', container, this._switchPrev, this);
className + '-arrow-prev', arrowsContainer, this._switchPrev, this);

this._nextButton = this._createButton(this.options.nextText, this.options.nextTitle,
className + '-arrow-next', container, this._switchNext, this);
className + '-arrow-next', arrowsContainer, this._switchNext, this);

if (this.options.showList) {
var form = this._form = L.DomUtil.create('form', className + '-fullist');
var form = this._form = L.DomUtil.create('form', className + '-form leaflet-bar');
this._fullist = L.DomUtil.create('select', className + '-list', form);
this._fullist.style.width = '100%';

Expand Down Expand Up @@ -78,8 +79,7 @@ L.Control.LocationList = L.Control.extend({
obj = this.options.locationsList[i];
this._fullist.appendChild(this._createListElement(obj,i));
};

console.log(this);

return this;
},

Expand Down

0 comments on commit 279c59d

Please sign in to comment.