[Libreoffice-commits] online.git: loleaflet/src
Henry Castro
hcastro at collabora.com
Thu Sep 15 21:20:31 UTC 2016
loleaflet/src/layer/Popup.js | 5 +++++
loleaflet/src/layer/tile/TileLayer.js | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit f1b54a3f579758fcb2ba47e5f7ef4faa0412bf27
Author: Henry Castro <hcastro at collabora.com>
Date: Thu Sep 15 17:21:33 2016 -0400
loleaflet: add border color to L.Popup
diff --git a/loleaflet/src/layer/Popup.js b/loleaflet/src/layer/Popup.js
index 2098b63..9e8f0cf 100644
--- a/loleaflet/src/layer/Popup.js
+++ b/loleaflet/src/layer/Popup.js
@@ -167,6 +167,11 @@ L.Popup = L.Layer.extend({
this._tipContainer = L.DomUtil.create('div', prefix + '-tip-container', container);
this._tip = L.DomUtil.create('div', prefix + '-tip', this._tipContainer);
+
+ if (this.options.borderColor) {
+ this._tip.style['border'] = this._wrapper.style['border'] = '2px solid ' + this.options.borderColor;
+ this._closeButton.style['color'] = this.options.borderColor;
+ }
},
_updateContent: function () {
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index 89320d4..67c5f03 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1210,12 +1210,13 @@ L.TileLayer = L.GridLayer.extend({
if (!this._isEmptyRectangle(viewBounds) &&
(this._docType === 'text' || this._selectedPart === viewPart)) {
if (!viewMarker) {
+ var color = L.LOUtil.getViewIdHexColor(viewId);
viewMarker = L.rectangle(viewBounds, {
pointerEvents: 'auto',
fill: false,
- color: L.LOUtil.getViewIdHexColor(viewId)
+ color: color
});
- viewMarker.bindPopup(this._map.getViewName(viewId), {autoClose: false});
+ viewMarker.bindPopup(this._map.getViewName(viewId), {autoClose: false, borderColor: color});
this._graphicViewMarkers[viewId].marker = viewMarker;
}
else {
More information about the Libreoffice-commits
mailing list