kopia lustrzana https://github.com/FacilMap/facilmap
Make infoBox resizable
rodzic
18a3452f9f
commit
0ab0b6fd92
|
@ -3,4 +3,6 @@
|
|||
<div class="html"></div>
|
||||
<button type="button" class="btn btn-link close-button" ng-click="hide()">×</button>
|
||||
</div>
|
||||
|
||||
<a href="javascript:" class="ui-resizable-handle ui-resizable-nw"><span class="glyphicon glyphicon-resize-horizontal"></span></a>
|
||||
</div>
|
|
@ -15,6 +15,14 @@ fm.app.factory("fmInfoBox", function($rootScope, $compile, $timeout) {
|
|||
$timeout(() => {
|
||||
el.insertAfter(map.map.getContainer()).hide();
|
||||
$compile(el)(scope);
|
||||
|
||||
el.resizable({
|
||||
handles: {
|
||||
nw: el.find(".ui-resizable-handle")
|
||||
},
|
||||
minHeight: 100,
|
||||
minWidth: 250
|
||||
});
|
||||
});
|
||||
|
||||
let infoBox = {
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
right: 10px;
|
||||
bottom: 25px;
|
||||
z-index: 800;
|
||||
width: 350px;
|
||||
max-width: 100%;
|
||||
|
||||
font-size: 12px;
|
||||
|
||||
|
@ -19,8 +17,12 @@
|
|||
box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
|
||||
margin-bottom: 0;
|
||||
|
||||
width: 350px;
|
||||
height: 200px;
|
||||
|
||||
.panel-body {
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
|
||||
.close-button {
|
||||
position: absolute;
|
||||
|
@ -33,8 +35,11 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.html {
|
||||
height: 100%;
|
||||
|
||||
.content {
|
||||
height: 200px;
|
||||
height: calc(100% - 47px);
|
||||
overflow: auto;
|
||||
|
||||
/* Replace padding by margin to move horizontal scrollbar a bit to the left so that it can be covered by .buttons */
|
||||
|
@ -66,6 +71,7 @@
|
|||
color: #888;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
position: absolute;
|
||||
|
@ -82,6 +88,28 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ui-resizable-handle {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transform: translate(-20%,-20%) rotate(45deg);
|
||||
cursor: nwse-resize;
|
||||
font-size: 15px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 1000px;
|
||||
display: inline-block;
|
||||
background: #fff;
|
||||
line-height: 25px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
color: #666;
|
||||
opacity: 0.5;
|
||||
transition: opacity .7s;
|
||||
}
|
||||
}
|
||||
|
||||
.fm-map-legend.fm-infoBox-hidden {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
:local(.className) {
|
||||
margin-top: 44px !important;
|
||||
height: calc(100% - 89px) !important;
|
||||
padding: 5px;
|
||||
|
||||
.nav-tabs {
|
||||
|
|
Ładowanie…
Reference in New Issue