Skip to content

Latest commit

 

History

History
104 lines (95 loc) · 4.56 KB

v2.0.0.md

File metadata and controls

104 lines (95 loc) · 4.56 KB

2.0.0

2024-01-14

Info

  • New major version due to changed callback-contract with the consumer. All callback functions now have the prefix 'on', for example onClicked. The callback functions have also been change to trigger after the action has been done. This is also reflected in the name where it is given in past tense.

  • Major code refactoring to standardize names and how the tools create objects in the Map and Toolbox. All event callbacks are also prefixed with 'on'. Event handlers now have limited internal logic to only call internal methods that can then be called and reused between multiple methods in the same tool.

  • Major code refactoring to enable multiple language support. The user can load any number of languages without the need to rebuild the application.

Bugs

  • Fixed PNG export when using OverviewTool, the selector unintentionally targeted the overview-canvas and not the actual map-canvas
  • Fixed State not clearing correctly on all tools

Removed Features

  • Removed NotificationTool

New Features

  • Added new manager SnapManager
  • Added new manager TranslationManager
  • Added new tool TranslationTool
  • Added new tool ZoomboxTool
  • Added new tool ToolboxTool
  • Added new tool ScissorsTool
  • Added new callback function to BookmarkTool named onDragged
  • Added new callback functions to LayerTool named onFeatureLayerDragged and onMapLayerDragged
  • Added new callback function to all tools that have a state saved in localStorage named onBrowserStateCleared
  • Added new callback function to all tools named onInitiated
  • Added new callback function to DrawTool named onSnapped
  • Added new callback function to MeasureTool named onSnapped
  • Added new callback function to CoordinatesTool named onSnapped
  • Added new options to BookmarkTool and MyLocationTool
{
    markerLabelUseEllipsisAfter,
    markerLabelUseUpperCase
}
  • Added browser information object to DebugInfoModal
  • Added labels to display over IconMarkers and WindBarbs
  • Added new options to generateIconMarker and generateWindBarb
{
    labelFill,
    labelStroke,
    labelStrokeWidth,
    labelFont,
    labelUseEllipsisAfter,
    shouldRenderLabel,
    shouldRenderLabelUpperCase,
}
  • Added new action in DebugInfoModal to allow user to generate new UUID
  • Added new callback function named onInput in Dialog.Prompt
  • Added new item in contextmenu to copy coordinates at the clicked position
  • Added new argument named result to onReset for ResetNorthTool
  • Added new argument named result to onZoomed for ZoomInTool
  • Added new argument named result to onZoomed for ZoomOutTool
  • Added new argument named result to onNavigatedHome for HomeTool
  • Added new Filter function to DebugInfoModal
  • Added new button in InfoWindow to indicate what layer the feature belongs to
  • Added pulse animation to selected Marker, opt-out in config.json
  • Added Sortabje.js to allow for Layers and Bookmarks to be dragged to change order zIndex

Refactoring

  • Changed all methods that trigger a dialog to have prefix 'ask'
  • Changed all internal methods that perform actions in a tool to have prefix 'do'
  • Changed all callbacks to have prefix 'on'
  • Changed from onHome to onNavigatedHome
  • Changed from onClick to onClicked
  • Changed from active to isActive
  • Changed from collapsed to isCollapsed
  • Changed from visible to isVisible
  • Changed from silent to isSilent
  • Changed from onLocation to onLocationFound
  • Changed from generateMarker to generateIconMarker
  • Changed from fill and stroke to markerFill and markerStroke in generateIconMarker
  • Changed goToView to have one options object as argument, including onDone callback with result of the animation

Code Quality

  • Change from spread-operator to lodash _.merge and _.clonedeep, to avoid cross references in objects with depth > 1
  • Prefixed references to HTML elements with uiRef
  • Removed repetitive window.setTimeout and replaced with InfoWindow.showOverly and InfoWindow.showDelayedOverlay
  • Improved overall readability of the code, added block-comments to each file to show intent of each section of code

Packages

  • browser-dtector 3.3.0 -> 4.1.0
  • jsts 2.9.3 -> 2.11.0
  • moment 2.29.4 -> 2.30.1
  • ol 7.5.0 -> 8.2.0
  • proj4 2.9.0 -> 2.9.2
  • sortablejs 1.15.1
  • uuid 9.0.0 -> 9.0.1
  • @parcel/transformer-sass 2.9.2 -> 2.10.3
  • @rollup/plugin-commonjs 25.0.2 -> 25.0.7
  • @rollup/plugin-json 6.0.0 -> 6.1.0
  • @rollup/plugin-node-resolve 15.1.0 -> 15.2.3
  • @rollup/plugin-replace 5.0.2 -> 5.0.5
  • @rollup/plugin-terser 0.4.3 -> 0.4.4
  • eslint 8.43.0 -> 8.56.0
  • lint-staged 13.2.2 -> 15.2.0
  • parcel 2.9.2 -> 2.10.3
  • rollup 3.25.1 -> 4.9.2
  • rollup-plugin-license 3.0.1 -> 3.2.0