Change CSS class for tooltips in measure example
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
.tooltip {
|
.ol-tooltip {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
@@ -6,18 +6,19 @@
|
|||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.tooltip-measure {
|
.ol-tooltip-measure {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.tooltip-static {
|
.ol-tooltip-static {
|
||||||
background-color: #ffcc33;
|
background-color: #ffcc33;
|
||||||
color: black;
|
color: black;
|
||||||
border: 1px solid white;
|
border: 1px solid white;
|
||||||
}
|
}
|
||||||
.tooltip-measure:before,
|
.ol-tooltip-measure:before,
|
||||||
.tooltip-static:before {
|
.ol-tooltip-static:before {
|
||||||
border-top: 6px solid rgba(0, 0, 0, 0.5);
|
border-top: 6px solid rgba(0, 0, 0, 0.5);
|
||||||
border-right: 6px solid transparent;
|
border-right: 6px solid transparent;
|
||||||
border-left: 6px solid transparent;
|
border-left: 6px solid transparent;
|
||||||
@@ -27,6 +28,6 @@
|
|||||||
margin-left: -7px;
|
margin-left: -7px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
}
|
}
|
||||||
.tooltip-static:before {
|
.ol-tooltip-static:before {
|
||||||
border-top-color: #ffcc33;
|
border-top-color: #ffcc33;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ function addInteraction() {
|
|||||||
|
|
||||||
draw.on('drawend',
|
draw.on('drawend',
|
||||||
function() {
|
function() {
|
||||||
measureTooltipElement.className = 'tooltip tooltip-static';
|
measureTooltipElement.className = 'ol-tooltip ol-tooltip-static';
|
||||||
measureTooltip.setOffset([0, -7]);
|
measureTooltip.setOffset([0, -7]);
|
||||||
// unset sketch
|
// unset sketch
|
||||||
sketch = null;
|
sketch = null;
|
||||||
@@ -245,7 +245,7 @@ function createHelpTooltip() {
|
|||||||
helpTooltipElement.parentNode.removeChild(helpTooltipElement);
|
helpTooltipElement.parentNode.removeChild(helpTooltipElement);
|
||||||
}
|
}
|
||||||
helpTooltipElement = document.createElement('div');
|
helpTooltipElement = document.createElement('div');
|
||||||
helpTooltipElement.className = 'tooltip hidden';
|
helpTooltipElement.className = 'ol-tooltip hidden';
|
||||||
helpTooltip = new Overlay({
|
helpTooltip = new Overlay({
|
||||||
element: helpTooltipElement,
|
element: helpTooltipElement,
|
||||||
offset: [15, 0],
|
offset: [15, 0],
|
||||||
@@ -263,7 +263,7 @@ function createMeasureTooltip() {
|
|||||||
measureTooltipElement.parentNode.removeChild(measureTooltipElement);
|
measureTooltipElement.parentNode.removeChild(measureTooltipElement);
|
||||||
}
|
}
|
||||||
measureTooltipElement = document.createElement('div');
|
measureTooltipElement = document.createElement('div');
|
||||||
measureTooltipElement.className = 'tooltip tooltip-measure';
|
measureTooltipElement.className = 'ol-tooltip ol-tooltip-measure';
|
||||||
measureTooltip = new Overlay({
|
measureTooltip = new Overlay({
|
||||||
element: measureTooltipElement,
|
element: measureTooltipElement,
|
||||||
offset: [0, -15],
|
offset: [0, -15],
|
||||||
|
|||||||
Reference in New Issue
Block a user