Skip to content

Commit

Permalink
Fix events on minimal ui (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarciabriseno authored Feb 8, 2024
1 parent 8584556 commit ac2cc56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions resources/js/Events/HelioviewerEventLayerManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ var HelioviewerEventLayerManager = EventLayerManager.extend(
* Loads initial layers either from URL parameters, saved user settings, or the defaults.
*/
_loadStartingLayers: function (layers) {
var eventLayer, basicParams, self = this;

// Add the event layer
this.addEventLayer(
new HelioviewerEventLayer(this._eventLayers.length, this._requestDate, this.viewportScale,
'HEK', true, Helioviewer.userSettings.get("state.eventLabels"), {"action": "events", "sources": "HEK", "ar_filter": true})
);

this.addEventLayer(
new HelioviewerEventLayer(this._eventLayers.length, this._requestDate, this.viewportScale,
'CCMC', true, true, {"action": "events", "sources": "CCMC"})
);
if (outputType != 'minimal') {
this.addEventLayer(
new HelioviewerEventLayer(this._eventLayers.length, this._requestDate, this.viewportScale,
'CCMC', true, true, {"action": "events", "sources": "CCMC"})
);
}
},

/**
Expand Down
8 changes: 4 additions & 4 deletions resources/js/UI/EventLayerAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,15 @@ var EventLayerAccordion = Layer.extend(
eventsDiv = '<div id="k12-events-visibility-btn-'+id+'" class="k12-eventsVisBtn" title="Toggle visibility of event marker pins" style="display: flex;">'
+ visibilityBtn
+ '<p id="k12-events-btn-text" style="margin-left:0.3em;">EVENTS ARE ON<p></div>';

let jstree = '<div id=' + treeid + ' style="display: none"></div>';

//Add to accordion
this.domNode.append(eventsDiv);
this.domNode.append(jstree);

this._loadEvents(treeid, apiSource);

//this.domNode.find("#visibilityAvailableBtn-"+id).click( function(e) {
this.domNode.find("#k12-events-visibility-btn-"+id).click( function(e) {
var visState = Helioviewer.userSettings.get("state.eventLayerAvailableVisible");
if(visState == true){
Expand Down Expand Up @@ -307,9 +309,7 @@ var EventLayerAccordion = Layer.extend(

// Function for toggling layer visibility
toggleVisibility = function (e) {
var domNode;

domNode = $(document).find(".event-container");
let domNode = $(document).find(".event-container");
if ( domNode.css('display') == 'none') {
domNode.show();
Helioviewer.userSettings.set("state.eventLayerVisible", true);
Expand Down

0 comments on commit ac2cc56

Please sign in to comment.