Merge branch 'snap-to-grid' of https://repos.hackathon.bz.it/2025-summer/team-3 into snap-to-grid
This commit is contained in:
commit
ca30fa1b4a
2 changed files with 9 additions and 34 deletions
|
@ -627,51 +627,25 @@ label.theme-color-label {
|
||||||
.edge-highlight {
|
.edge-highlight {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
animation: edge-fade-in 0.2s ease-in;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.original-edge-highlight {
|
.original-edge-highlight {
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
animation: edge-fade-in 0.2s ease-in;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes edge-fade-in {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Right-angle snap indicators */
|
/* Right-angle snap indicators */
|
||||||
.right-angle-reference {
|
.right-angle-reference {
|
||||||
z-index: 998;
|
z-index: 998;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
animation: edge-fade-in 0.2s ease-in;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-angle-line {
|
.right-angle-line {
|
||||||
z-index: 1001;
|
z-index: 1001;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
animation: right-angle-pulse 2s infinite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-angle-square {
|
.right-angle-square {
|
||||||
z-index: 1002;
|
z-index: 1002;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
animation: right-angle-pulse 2s infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes right-angle-pulse {
|
|
||||||
0% {
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2082,17 +2082,18 @@ editor = {
|
||||||
_show_snap_indicator: function(latlng, snapInfo) {
|
_show_snap_indicator: function(latlng, snapInfo) {
|
||||||
editor._clear_snap_indicators();
|
editor._clear_snap_indicators();
|
||||||
|
|
||||||
// snap point indicator
|
var size = 0.001;
|
||||||
var indicator = L.circleMarker(latlng, {
|
var bounds = [
|
||||||
radius: 4,
|
[latlng.lat - size, latlng.lng - size],
|
||||||
color: '#ff6b6b',
|
[latlng.lat + size, latlng.lng + size]
|
||||||
fillColor: '#ff6b6b',
|
];
|
||||||
fillOpacity: 0.8,
|
var indicator = L.rectangle(bounds, {
|
||||||
|
color: '#666',
|
||||||
weight: 2,
|
weight: 2,
|
||||||
lineCap: "square",
|
lineCap: "square",
|
||||||
fillOpacity: 1.,
|
fillOpacity: 1.,
|
||||||
className: 'snap-indicator'
|
className: 'snap-indicator'
|
||||||
});
|
});
|
||||||
|
|
||||||
editor._snap_indicator.addLayer(indicator);
|
editor._snap_indicator.addLayer(indicator);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue