Skip to content

Commit

Permalink
Issue #65: Finished the scrolling fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightsphere committed Aug 30, 2022
1 parent 6fb367f commit 5a345e0
Show file tree
Hide file tree
Showing 23 changed files with 358 additions and 290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ in its table's cells. The fixed component's were:
* `DialogDataTableComponent`
* `DialogDataTableLightComponent`
* `DialogTSTableComponent`
* Fixed a bug in the Dashboard Component that would briefly show the 404 page before
the dashboard was displayed.

### Refactoring ###

* Moved all
* Removed a half dozen unused class variables in the Map Component.

### Features / Enhancements ###

Expand All @@ -29,7 +36,7 @@ to the console. Depending on debugLevel, different amounts of messages are print
The way it is used now will probably be changed/updated in the future.
* Added the first iteration of the Story component. This is essentially a story
map that can be added as either a main or sub menu to the InfoMapper, and utilizes
the Dashboard component and its widgets for data layout.
the Dashboard component and its widgets for data layout and visualization.

# 4.0.2 (2022-08-05) #

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export class LegendBackgroundGroupComponent implements AfterViewInit {

/** The background geoLayerViewGroup passed as input from the Map Component when
* this component is created. */
@Input() geoLayerViewGroup: any;
@Input('geoLayerViewGroup') geoLayerViewGroup: any;
/** EventEmitter that alerts the Map component (parent) that an update has happened,
* and sends the selected background's geoLayerView name property. */
@Output() callSelectBackgroundLayer = new EventEmitter<any>();
@Output('callSelectBackgroundLayer') callSelectBackgroundLayer = new EventEmitter<any>();


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ export class LegendLayerGroupComponent implements AfterViewInit {

/** An object with each geoLayerId as the key, and all features of a geoLayerView,
* usually a FeatureCollection, as the value. */
@Input() allFeatures: any;
@Input('allFeatures') allFeatures: any;
/** EventEmitter that alerts the Map component (parent) that an update has happened,
* and sends the selected background's geoLayerView name property. */
// TODO: Not being used, can be used for another emitter to the Map Component.
@Output() callSelectBackgroundLayer = new EventEmitter<any>();
@Output('callSelectBackgroundLayer') callSelectBackgroundLayer = new EventEmitter<any>();
/** A categorized configuration object with the geoLayerId as key and a list of
* name followed by color for each feature in the Leaflet layer to be shown in
* the sidebar. */
@Input() categorizedLayerColors: any;
@Input('categorizedLayerColors') categorizedLayerColors: any;
/**
*
*/
Expand All @@ -64,24 +64,24 @@ export class LegendLayerGroupComponent implements AfterViewInit {
destroyed = new Subject<void>();
/** An object containing any event actions with their id as the key and the action
* object itself as the value. */
@Input() eventActions: any;
@Input('eventActions') eventActions: any;
/** The geoLayerViewGroup passed as input from the Map Component when
* this component is created. */
@Input() geoLayerViewGroup: any;
@Input('geoLayerViewGroup') geoLayerViewGroup: any;
/** An object of Style-like objects containing:
* key : geoLayerId
* value: object with style properties
* For displaying a graduated symbol in the Leaflet legend. */
@Input() graduatedLayerColors: any;
@Input('graduatedLayerColors') graduatedLayerColors: any;
/** Boolean test variable for use with Angular Material slide toggle. */
isChecked = true;
/** Represents the Date string since the last time a layer was updated. */
@Input() lastRefresh: any;
@Input('lastRefresh') lastRefresh: any;
/** Object containing a layer geoLayerId as the ID, and an object of properties
* set by a user-defined classification file. */
@Input() layerClassificationInfo: any;
@Input('layerClassificationInfo') layerClassificationInfo: any;
/** Reference to the Map Component Leaflet map object. */
@Input() mainMap: any;
@Input('mainMap') mainMap: any;

@Input('mapConfig') mapConfig: IM.GeoMapProject;
/** The instance of the MapLayerManager, a helper class that manages MapLayerItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
/** Object to hold each Leaflet map reference as the value, with the map
* configuration's geoMapId property as the key. */
maps: {} = {};
/**
*
*/
uniqueId = 0;


/**
Expand All @@ -33,25 +29,36 @@
/**
* Adds a Leaflet map reference to the @var maps object with the unique mapID as the key.
* @param mapID A string representing the geoMapId from the map configuration file.
* @param mapRef The reference to the Map Component's @var mainMap Leaflet map.
* @param map The reference to the Map Component's @var mainMap Leaflet map.
*/
addMap(mapID: string, mapRef: any): void {
this.maps[mapID] = mapRef;
addMap(mapID: string, map: any): void {
this.maps[mapID] = map;
}

/**
*
* @returns A boolean on whether this map has already been created.
* @param geoMapId The map's geoMapId property from it's configuration file.
*/
createUniqueId(): string {
return 'mapID' + (this.uniqueId += 1);
doesMapExist(geoMapId: string): boolean {
return geoMapId in this.maps;
}

/**
* @returns A boolean on whether this map has already been created.
* @param geoMapId The map's geoMapId property from it's configuration file.
*
* @param mapID
*/
mapAlreadyCreated(geoMapId: string): boolean {
return geoMapId in this.maps;
getMap(mapID: string): any {

if (this.maps[mapID]) {
return this.maps[mapID];
} else {
for (const key in this.maps) {
if (key.includes(mapID)) {
return this.maps[key];
}
}
}
return null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,40 @@ line-break points, such as dashes '-'. */
padding: 5px 10px !important;
}

.scroll-toggle {
height: 30px;
width: 30px;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 5px;
border: rgba(0,0,0,0.3) solid 2px;

display: flex;
justify-content: center;
align-items: center;
}

/* */
.scroll-toggle .scroll-toggle-tooltip {
visibility: hidden;
width: 250px;
background-color: rgba(0,0,0,0.7);
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;

/* Position the tooltip. */
position: absolute;
z-index: 1;
top: -15px;
right: 150%;
}

/* */
.scroll-toggle:hover .scroll-toggle-tooltip {
visibility: visible;
}

/* Div to be displayed if the correct app config object ID is given in the URL. */
.show-map-container {
height: 100%;
Expand Down
Loading

0 comments on commit 5a345e0

Please sign in to comment.