mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
parent
de93446af2
commit
1029c2655e
6 changed files with 63 additions and 19 deletions
|
@ -112,6 +112,9 @@ html[dir="rtl"] .icon {
|
|||
.icon-polyline {
|
||||
background-position: 0 calc(var(--tile) * 3);
|
||||
}
|
||||
.icon-profile {
|
||||
background-position: 0 calc(var(--tile) * 4);
|
||||
}
|
||||
.icon-resize {
|
||||
background-position: calc(var(--tile) * 3) calc(var(--tile) * 6);
|
||||
}
|
||||
|
|
|
@ -190,5 +190,11 @@
|
|||
<path id="path9" transform="translate(0 812.36)" d="m12.773 42.244c-0.4045-0.18728-0.73246-0.52685-0.9029-0.93487l-0.12875-0.30821-7.6214-0.04285-0.026557-0.23161c-0.055311-0.48238-0.16774-0.4688 3.8893-0.46961l3.7189-7.33e-4 0.21287-0.43192c0.65163-1.3222 2.4726-1.2846 3.1257 0.06446l0.17859 0.36892h2.2972c2.2584 0 2.2988 3e-3 2.391 0.17524 0.06808 0.12721 0.06936 0.22886 0.0047 0.37084l-0.08912 0.1956h-4.6108l-0.15493 0.35024c-0.38713 0.87516-1.4373 1.2865-2.2839 0.89448zm1.0632-0.70036c0.37802-0.15795 0.5443-0.42579 0.54116-0.87174-4e-3 -0.57358-0.36338-0.90877-0.9743-0.90877-0.31204 0-0.40386 0.04292-0.64992 0.30383-0.25777 0.27331-0.28248 0.33986-0.2461 0.66262 0.04524 0.40136 0.22819 0.65122 0.5956 0.81339 0.31718 0.14001 0.39991 0.14008 0.73356 6.68e-4z" fill="#f2f2f2" stroke="#999" stroke-width=".25" style="paint-order:fill markers stroke"/>
|
||||
<path id="path1-67-5" d="m154.68 963.54 4.7344 4.7344-5.0508 4.6836-1.3594-1.4668 3.5274-3.2695-3.2656-3.2656z" color="#000000" fill="#f2f2f2" fill-rule="evenodd" stroke="#999" stroke-width=".25"/>
|
||||
<path id="copy" d="m58 914.36v3.5h4v4h3.5v-7.5zm-4 4v7.5h7.5v-7.5z" fill="#f2f2f2" style="paint-order:fill markers stroke"/>
|
||||
<g id="g1-5" transform="translate(.1 .1)">
|
||||
<g id="g24" fill="#f2f2f2" stroke="#999" stroke-width=".2">
|
||||
<path id="path24" d="m12 912.36c-4.4183 0-8 3.5817-8 8 0.00463 1.6156 0.49829 3.1919 1.416 4.5215 0.19802 0.28729 0.41463 0.56131 0.64844 0.82032 1.5128 1.6866 3.6699 2.6526 5.9355 2.6582 2.2669-6e-3 4.4249-0.97357 5.9375-2.6621 0.23535-0.26077 0.45327-0.53676 0.65234-0.82617 0.91377-1.3275 1.4053-2.9001 1.4102-4.5117 0-4.4183-3.5817-8-8-8zm-5.3242 12.506c1.3285-1.5609 3.2745-2.461 5.3242-2.4629 2.0504 1e-3 3.9972 0.90149 5.3262 2.4629 0 0-0.0035-3e-3 0.0059 6e-3 0 0-0.5371 0.5762-0.83984 0.82812-0.17533 0.14821-0.35784 0.2877-0.54687 0.41797-0.06626 0.0467-0.13333 0.0923-0.20117 0.13672-0.2448 0.15763-0.4992 0.29983-0.76172 0.42578-0.93187 0.44366-1.9503 0.67577-2.9824 0.67969-0.61808-5e-3 -1.2328-0.0915-1.8281-0.25781-0.67532-0.18416-1.3192-0.46858-1.9102-0.84375-0.0685-0.0444-0.13622-0.09-0.20312-0.13672-0.00521-4e-3 -0.010422-8e-3 -0.015625-0.0117-0.18766-0.12974-0.36887-0.26858-0.54297-0.41602-0.29972-0.24977-0.57803-0.52416-0.83203-0.82031m-0.5918-0.81445c-0.69766-1.1081-1.0705-2.3898-1.0762-3.6992 0-3.866 3.134-7 7-7l-4.1e-5 -1.6e-4c3.866 0 7 3.134 7 7-0.0054 1.3023-0.37406 2.5773-1.0645 3.6816-1.5163-1.6794-3.6729-2.6381-5.9355-2.6387-2.2613 8e-3 -4.4134 0.97341-5.9238 2.6562" style="paint-order:fill markers stroke"/>
|
||||
<path id="path11" d="m12 914.86a2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0-2.5-2.5zm0 1a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1-1.5 1.5 1.5 1.5 0 0 1-1.5-1.5 1.5 1.5 0 0 1 1.5-1.5z" style="paint-order:fill markers stroke"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 41 KiB |
|
@ -16,7 +16,7 @@
|
|||
<path d="M 16.0401,2.3158 H 2.005 v 14.0351 h 14.0351 z" fill="#ffffff" id="path1259" />
|
||||
</mask>
|
||||
</defs>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.8200527" inkscape:cx="86.648019" inkscape:cy="92.276213" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1011" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" showguides="true" inkscape:guide-bbox="true" inkscape:snap-grids="true" inkscape:snap-to-guides="true" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1">
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="3.8200527" inkscape:cx="86.517131" inkscape:cy="92.276214" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" inkscape:window-height="1011" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" showguides="true" inkscape:guide-bbox="true" inkscape:snap-grids="true" inkscape:snap-to-guides="true" inkscape:showpageshadow="2" inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1">
|
||||
<inkscape:grid type="xygrid" id="grid3004" empspacing="4" visible="true" enabled="true" snapvisiblegridlinesonly="true" originx="0" originy="0" spacingy="1" spacingx="1" units="px" />
|
||||
<sodipodi:guide orientation="-1,0" position="24,168" id="guide3084" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
||||
<sodipodi:guide orientation="0,1" position="0,96" id="guide3086" inkscape:locked="false" inkscape:label="" inkscape:color="rgb(0,134,229)" />
|
||||
|
@ -212,5 +212,11 @@
|
|||
<path style="fill:#f2f2f2;stroke:#999999;stroke-width:0.25;paint-order:fill markers stroke" d="m 12.773494,42.243521 c -0.4045,-0.187277 -0.732456,-0.526846 -0.902897,-0.934868 l -0.128748,-0.308213 -3.8106837,-0.02143 -3.8106834,-0.02142 -0.026557,-0.23161 c -0.055311,-0.482381 -0.1677415,-0.468805 3.8892984,-0.469606 l 3.7189457,-7.33e-4 0.21287,-0.431917 c 0.651632,-1.322166 2.472575,-1.284611 3.125651,0.06446 l 0.178591,0.36892 h 2.297219 c 2.258426,0 2.298803,0.003 2.391007,0.175244 0.06808,0.127207 0.06936,0.228859 0.0047,0.370843 l -0.08912,0.1956 h -2.305381 -2.30538 l -0.15493,0.350241 c -0.387132,0.875164 -1.437261,1.286451 -2.283867,0.894485 z m 1.063202,-0.700358 c 0.378023,-0.157949 0.544298,-0.425794 0.541165,-0.871741 -0.004,-0.573585 -0.363385,-0.908772 -0.974299,-0.908772 -0.312041,0 -0.40386,0.04292 -0.649922,0.303826 -0.257768,0.273313 -0.282484,0.339859 -0.246104,0.662621 0.04524,0.401361 0.228194,0.651219 0.595596,0.813394 0.317179,0.140006 0.399909,0.140082 0.733564,6.68e-4 z" id="path9" transform="translate(0,812.36218)" />
|
||||
<path style="color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:evenodd;stroke:#999999;stroke-width:0.25;stroke-dasharray:none;stroke-opacity:1" d="m 154.67579,963.53902 4.73437,4.73437 -5.05078,4.6836 -1.35938,-1.4668 3.52735,-3.26953 -3.26563,-3.26563 z" id="path1-67-5" />
|
||||
<path id="copy" style="fill:#f2f2f2;paint-order:fill markers stroke;fill-opacity:1" d="m 58,914.36218 v 3.5 h 4 v 4 h 3.5 v -7.5 z m -4,4 v 7.5 h 7.5 v -7.5 z" />
|
||||
<g id="g1-5" transform="translate(0.1,0.1)">
|
||||
<g id="g24">
|
||||
<path d="m 12,912.36218 c -4.4182692,0 -8,3.58172 -8,8 0.00463,1.61557 0.4982915,3.19189 1.4160156,4.52148 0.1980248,0.28729 0.4146342,0.56131 0.6484375,0.82032 1.5128357,1.68659 3.6698868,2.65261 5.9355469,2.6582 2.266949,-0.006 4.424914,-0.97357 5.9375,-2.66211 0.23535,-0.26077 0.45327,-0.53676 0.652344,-0.82617 0.913769,-1.32754 1.405284,-2.9001 1.410156,-4.51172 0,-4.41828 -3.58173,-8 -8,-8 z m -5.3242188,12.50586 c 1.3285496,-1.56088 3.274489,-2.46104 5.3242188,-2.46289 2.050412,10e-4 3.997179,0.90149 5.326172,2.46289 0,0 -0.0035,-0.003 0.0059,0.006 0,0 -0.537098,0.5762 -0.839844,0.82812 -0.175326,0.14821 -0.35784,0.2877 -0.546874,0.41797 -0.06626,0.0467 -0.133328,0.0923 -0.201172,0.13672 -0.244804,0.15763 -0.499205,0.29983 -0.761719,0.42578 -0.931874,0.44366 -1.950332,0.67577 -2.982422,0.67969 -0.618083,-0.005 -1.232807,-0.0915 -1.828125,-0.25781 -0.6753225,-0.18416 -1.3192066,-0.46858 -1.9101562,-0.84375 -0.0685,-0.0444 -0.1362192,-0.09 -0.203125,-0.13672 -0.00521,-0.004 -0.010422,-0.008 -0.015625,-0.0117 -0.1876607,-0.12974 -0.3688672,-0.26858 -0.5429688,-0.41602 -0.2997188,-0.24977 -0.5780329,-0.52416 -0.8320313,-0.82031 m -0.5917968,-0.81445 c -0.6976631,-1.10814 -1.0705109,-2.38976 -1.0761719,-3.69922 0,-3.86599 3.1340146,-7 7,-7 l -4.1e-5,-1.6e-4 c 3.865985,0 7,3.13401 7,7 -0.0054,1.30234 -0.374061,2.57734 -1.064453,3.68164 -1.516341,-1.67935 -3.672913,-2.63806 -5.935547,-2.63867 -2.2612709,0.008 -4.4133749,0.97341 -5.9238281,2.65625" style="fill:#f2f2f2;stroke:#999999;stroke-width:0.2;paint-order:fill markers stroke" id="path24" sodipodi:nodetypes="scccccccsccccccccccccccccccccccc" />
|
||||
<path id="path11" style="fill:#f2f2f2;stroke:#999999;stroke-width:0.2;stroke-dasharray:none;paint-order:fill markers stroke" d="m 12,914.86218 a 2.5,2.5 0 0 0 -2.5,2.5 2.5,2.5 0 0 0 2.5,2.5 2.5,2.5 0 0 0 2.5,-2.5 2.5,2.5 0 0 0 -2.5,-2.5 z m 0,1 a 1.5,1.5 0 0 1 1.5,1.5 1.5,1.5 0 0 1 -1.5,1.5 1.5,1.5 0 0 1 -1.5,-1.5 1.5,1.5 0 0 1 1.5,-1.5 z" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 72 KiB |
|
@ -15,11 +15,16 @@ export default class ContextMenu extends Positioned {
|
|||
})
|
||||
}
|
||||
|
||||
open([x, y], items) {
|
||||
open([left, top], items) {
|
||||
this.container.innerHTML = ''
|
||||
for (const item of items) {
|
||||
if (item === '-') {
|
||||
this.container.appendChild(document.createElement('hr'))
|
||||
} else if (typeof item.action === 'string') {
|
||||
const li = loadTemplate(
|
||||
`<li class="${item.className || ''}"><a tabindex="0" href="${item.action}">${item.label}</a></li>`
|
||||
)
|
||||
this.container.appendChild(li)
|
||||
} else {
|
||||
const li = loadTemplate(
|
||||
`<li class="${item.className || ''}"><button tabindex="0" class="flat">${item.label}</button></li>`
|
||||
|
@ -32,8 +37,12 @@ export default class ContextMenu extends Positioned {
|
|||
}
|
||||
}
|
||||
document.body.appendChild(this.container)
|
||||
this.computePosition([x, y])
|
||||
this.container.querySelector('button').focus()
|
||||
if (this.options.fixed) {
|
||||
this.setPosition({ left, top })
|
||||
} else {
|
||||
this.computePosition([left, top])
|
||||
}
|
||||
this.container.querySelector('li > *').focus()
|
||||
this.container.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'Escape') {
|
||||
event.stopPropagation()
|
||||
|
|
|
@ -641,14 +641,37 @@ const ControlsMixin = {
|
|||
}
|
||||
this.on('postsync', L.bind(update, this))
|
||||
if (this.options.user?.id) {
|
||||
L.DomUtil.createLink(
|
||||
'umap-user',
|
||||
rightContainer,
|
||||
L._('My Dashboard ({username})', {
|
||||
username: this.options.user.name,
|
||||
}),
|
||||
this.options.user.url
|
||||
)
|
||||
const button = U.Utils.loadTemplate(`
|
||||
<button class="umap-user flat" type="button">
|
||||
<i class="icon icon-16 icon-profile"></i>
|
||||
<span>${this.options.user.name}</span>
|
||||
</button>
|
||||
`)
|
||||
rightContainer.appendChild(button)
|
||||
const menu = new U.ContextMenu({ className: 'dark', fixed: true })
|
||||
const actions = [
|
||||
{
|
||||
label: L._('New map'),
|
||||
action: this.urls.get('map_new'),
|
||||
},
|
||||
{
|
||||
label: L._('My profile'),
|
||||
action: this.urls.get('user_profile'),
|
||||
},
|
||||
{
|
||||
label: L._('My maps'),
|
||||
action: this.urls.get('user_dashboard'),
|
||||
},
|
||||
{
|
||||
label: L._('My teams'),
|
||||
action: this.urls.get('user_teams'),
|
||||
},
|
||||
]
|
||||
button.addEventListener('click', () => {
|
||||
const x = button.offsetLeft
|
||||
const y = button.offsetTop + button.offsetHeight
|
||||
menu.open([x, y], actions)
|
||||
})
|
||||
}
|
||||
this.help.getStartedLink(rightContainer)
|
||||
const controlEditCancel = L.DomUtil.createButton(
|
||||
|
@ -808,7 +831,8 @@ U.TileLayerControl = L.Control.IconLayers.extend({
|
|||
)
|
||||
const button = L.DomUtil.element({
|
||||
tagName: 'button',
|
||||
className: 'leaflet-iconLayers-layerCell leaflet-iconLayers-layerCell-plus button',
|
||||
className:
|
||||
'leaflet-iconLayers-layerCell leaflet-iconLayers-layerCell-plus button',
|
||||
textContent: '+',
|
||||
parent: lastRow,
|
||||
})
|
||||
|
|
|
@ -592,17 +592,16 @@ ul.photon-autocomplete {
|
|||
left: 0;
|
||||
right: 0;
|
||||
height: 46px;
|
||||
background-color: var(--color-darkGray);
|
||||
padding: 0 10px;
|
||||
text-align: start;
|
||||
line-height: var(--control-size);
|
||||
cursor: auto;
|
||||
border-bottom: 1px solid #222;
|
||||
z-index: var(--zindex-panels);
|
||||
opacity: 0.98;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
.umap-left-edit-toolbox,
|
||||
.umap-right-edit-toolbox {
|
||||
|
@ -1488,9 +1487,6 @@ span.popup-icon {
|
|||
.umap-main-edit-toolbox .umap-user {
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
.umap-main-edit-toolbox .umap-user:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media all and (max-width: 640px) {
|
||||
.umap-main-edit-toolbox .umap-user {
|
||||
|
|
Loading…
Reference in a new issue