Skip to content

Commit

Permalink
refactor: move files, merge module
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Sep 12, 2024
1 parent 21b5168 commit d05456e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
5 changes: 3 additions & 2 deletions app/scripts/components/dynamic_tabs/map-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import angular from "angular"
import { html } from "@/util"
import "@/components/korp-error"
import "@/components/result-map"
import "@/directives/tab-spinner"

angular.module("korpApp").directive("mapTabs", () => ({
Expand Down Expand Up @@ -36,14 +37,14 @@ angular.module("korpApp").directive("mapTabs", () => ({
>
</div>
</div>
<sb-map
<result-map
center="center"
markers="markerGroups"
marker-callback="newKWICSearch"
selected-groups="selectedGroups"
rest-color="restColor"
use-clustering="useClustering"
></sb-map>
></result-map>
</div>
</div>
</uib-tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
import angular from "angular"
import L, { Map } from "leaflet"
import { html } from "@/util"
import "./geokorp.scss"

const sbMap = angular.module("sbMap", [])

sbMap.filter("trust", ($sce) => (input) => $sce.trustAsHtml(input))
import "@/../styles/map.scss"

/**
* @typedef SbMapScope
Expand All @@ -22,7 +18,7 @@ sbMap.filter("trust", ($sce) => (input) => $sce.trustAsHtml(input))
* @prop {string} color
*/

sbMap.component("sbMap", {
angular.module("korpApp").component("resultMap", {
template: html`<div class="map">
<div class="map-outer-container" ng-show="showMap">
<div class="map-container"></div>
Expand Down
2 changes: 0 additions & 2 deletions app/scripts/korp.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import angular from "angular"
import "angular-ui-bootstrap"
import "angular-spinner"
import "angular-ui-sortable"
import "@/geo/geokorp"
import "angular-dynamic-locale"
import "angular-filter"

Expand Down Expand Up @@ -35,7 +34,6 @@ const korpApp = angular.module("korpApp", [
"uib/template/popover/popover-template.html",
"angularSpinner",
"ui.sortable",
"sbMap",
"tmh.dynamicLocale",
"angular.filter",
])
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/geo/geokorp.scss → app/styles/map.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sb-map {
result-map {
padding: 8px;

.leaflet-div-icon {
Expand Down

0 comments on commit d05456e

Please sign in to comment.