mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 16:52:31 +00:00
increase opacity when selected
This commit is contained in:
@@ -174,7 +174,6 @@
|
|||||||
let changed: (string | number)[] = [];
|
let changed: (string | number)[] = [];
|
||||||
Object.entries(elements).forEach(([id, element]) => {
|
Object.entries(elements).forEach(([id, element]) => {
|
||||||
if (element === null) {
|
if (element === null) {
|
||||||
console.log('element is null', orientation, sortableLevel, id);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let realId =
|
let realId =
|
||||||
|
@@ -8,7 +8,7 @@ import { ListTrackSegmentItem, type ListItem, ListWaypointItem, ListWaypointsIte
|
|||||||
import type { Waypoint } from "gpx";
|
import type { Waypoint } from "gpx";
|
||||||
|
|
||||||
let defaultWeight = 5;
|
let defaultWeight = 5;
|
||||||
let defaultOpacity = 1;
|
let defaultOpacity = 0.7;
|
||||||
|
|
||||||
const colors = [
|
const colors = [
|
||||||
'#ff0000',
|
'#ff0000',
|
||||||
@@ -281,6 +281,7 @@ export class GPXLayer {
|
|||||||
}
|
}
|
||||||
if (get(selection).hasAnyParent(new ListTrackSegmentItem(this.fileId, trackIndex, segmentIndex)) || get(selection).hasAnyChildren(new ListWaypointsItem(this.fileId), true)) {
|
if (get(selection).hasAnyParent(new ListTrackSegmentItem(this.fileId, trackIndex, segmentIndex)) || get(selection).hasAnyChildren(new ListWaypointsItem(this.fileId), true)) {
|
||||||
feature.properties.weight = feature.properties.weight + 2;
|
feature.properties.weight = feature.properties.weight + 2;
|
||||||
|
feature.properties.opacity = (feature.properties.opacity + 1) / 2;
|
||||||
}
|
}
|
||||||
feature.properties.trackIndex = trackIndex;
|
feature.properties.trackIndex = trackIndex;
|
||||||
feature.properties.segmentIndex = segmentIndex;
|
feature.properties.segmentIndex = segmentIndex;
|
||||||
|
Reference in New Issue
Block a user