mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Fix live map checkbox
This commit is contained in:
parent
6fdecb1724
commit
e127511262
3 changed files with 9 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
## Fixed
|
||||
|
||||
- The Warden error in jobs is now fixed. #1556
|
||||
- The Live Map setting is now respected.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -969,6 +969,12 @@ export default class extends BaseController {
|
|||
this.routeOpacity = parseFloat(newSettings.route_opacity) || 0.6;
|
||||
this.clearFogRadius = parseInt(newSettings.fog_of_war_meters) || 50;
|
||||
|
||||
// Update the DOM data attribute to keep it in sync
|
||||
const mapElement = document.getElementById('map');
|
||||
if (mapElement) {
|
||||
mapElement.setAttribute('data-user_settings', JSON.stringify(this.userSettings));
|
||||
}
|
||||
|
||||
// Store current layer states
|
||||
const layerStates = {
|
||||
Points: this.map.hasLayer(this.markersLayer),
|
||||
|
|
|
|||
|
|
@ -70,6 +70,8 @@ class Point < ApplicationRecord
|
|||
|
||||
# rubocop:disable Metrics/MethodLength Metrics/AbcSize
|
||||
def broadcast_coordinates
|
||||
return unless user.safe_settings.live_map_enabled
|
||||
|
||||
PointsChannel.broadcast_to(
|
||||
user,
|
||||
[
|
||||
|
|
|
|||
Loading…
Reference in a new issue