react-spatial 2.0.0-beta.0 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -10
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.js +188 -107
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.js.map +2 -2
- package/components/BaseLayerSwitcher/BaseLayerSwitcher.scss +6 -5
- package/components/BaseLayerSwitcher/index.js.map +2 -2
- package/components/BasicMap/BasicMap.js +116 -98
- package/components/BasicMap/BasicMap.js.map +2 -2
- package/components/BasicMap/index.js.map +2 -2
- package/components/CanvasSaveButton/CanvasSaveButton.js +448 -316
- package/components/CanvasSaveButton/CanvasSaveButton.js.map +2 -2
- package/components/CanvasSaveButton/CanvasSaveButton.md.scss +1 -1
- package/components/CanvasSaveButton/index.js.map +2 -2
- package/components/Copyright/Copyright.js +43 -35
- package/components/Copyright/Copyright.js.map +2 -2
- package/components/Copyright/index.js.map +2 -2
- package/components/FeatureExportButton/FeatureExportButton.js +35 -17
- package/components/FeatureExportButton/FeatureExportButton.js.map +2 -2
- package/components/FeatureExportButton/index.js.map +2 -2
- package/components/FitExtent/FitExtent.js +36 -18
- package/components/FitExtent/FitExtent.js.map +2 -2
- package/components/FitExtent/index.js.map +2 -2
- package/components/Geolocation/Geolocation.js +131 -92
- package/components/Geolocation/Geolocation.js.map +2 -2
- package/components/Geolocation/Geolocation.scss +7 -5
- package/components/Geolocation/index.js.map +2 -2
- package/components/LayerTree/LayerTree.js +361 -169
- package/components/LayerTree/LayerTree.js.map +2 -2
- package/components/LayerTree/LayerTree.scss +4 -6
- package/components/LayerTree/index.js.map +2 -2
- package/components/MousePosition/MousePosition.js +64 -33
- package/components/MousePosition/MousePosition.js.map +2 -2
- package/components/MousePosition/index.js.map +2 -2
- package/components/NorthArrow/NorthArrow.js +35 -19
- package/components/NorthArrow/NorthArrow.js.map +2 -2
- package/components/NorthArrow/index.js.map +2 -2
- package/components/Overlay/Overlay.js +100 -83
- package/components/Overlay/Overlay.js.map +2 -2
- package/components/Overlay/index.js.map +2 -2
- package/components/Permalink/Permalink.js +135 -90
- package/components/Permalink/Permalink.js.map +2 -2
- package/components/Permalink/index.js.map +2 -2
- package/components/Popup/Popup.js +134 -83
- package/components/Popup/Popup.js.map +2 -2
- package/components/Popup/Popup.md.scss +1 -0
- package/components/Popup/Popup.scss +3 -1
- package/components/Popup/index.js.map +2 -2
- package/components/ResizeHandler/ResizeHandler.js +51 -45
- package/components/ResizeHandler/ResizeHandler.js.map +2 -2
- package/components/ResizeHandler/index.js.map +2 -2
- package/components/RouteSchedule/RouteSchedule.js +218 -136
- package/components/RouteSchedule/RouteSchedule.js.map +2 -2
- package/components/RouteSchedule/RouteSchedule.md.scss +4 -2
- package/components/RouteSchedule/RouteSchedule.scss +12 -23
- package/components/RouteSchedule/index.js.map +2 -2
- package/components/ScaleLine/ScaleLine.js +11 -9
- package/components/ScaleLine/ScaleLine.js.map +2 -2
- package/components/ScaleLine/ScaleLine.scss +6 -4
- package/components/ScaleLine/index.js.map +2 -2
- package/components/StopsFinder/StopsFinder.js +141 -118
- package/components/StopsFinder/StopsFinder.js.map +2 -2
- package/components/StopsFinder/StopsFinderOption.js +11 -24
- package/components/StopsFinder/StopsFinderOption.js.map +2 -2
- package/components/StopsFinder/index.js.map +2 -2
- package/components/Zoom/Zoom.js +101 -62
- package/components/Zoom/Zoom.js.map +2 -2
- package/components/Zoom/Zoom.md.scss +3 -1
- package/components/Zoom/Zoom.scss +7 -5
- package/components/Zoom/index.js.map +2 -2
- package/images/geops_qr.png +0 -0
- package/package.json +81 -177
- package/propTypes.js +67 -0
- package/propTypes.js.map +7 -0
- package/setupTests.js +22 -0
- package/setupTests.js.map +7 -0
- package/themes/README.md +26 -0
- package/themes/default/components.scss +9 -13
- package/themes/default/examples.scss +20 -19
- package/themes/default/index.scss +3 -3
- package/themes/default/mixins.scss +7 -5
- package/themes/default/variables.scss +27 -25
- package/utils/GlobalsForOle.js +57 -57
- package/utils/GlobalsForOle.js.map +2 -2
- package/utils/KML.js +174 -49
- package/utils/KML.js.map +2 -2
- package/utils/Styles.js +7 -7
- package/utils/Styles.js.map +2 -2
- package/utils/getLayersAsFlatArray.js +14 -0
- package/utils/getLayersAsFlatArray.js.map +7 -0
- package/utils/getPolygonPattern.js.map +2 -2
- package/utils/timeUtils.js +11 -7
- package/utils/timeUtils.js.map +2 -2
- package/components/FilterButton/FilterButton.js +0 -66
- package/components/FilterButton/FilterButton.js.map +0 -7
- package/components/FilterButton/FilterButton.scss +0 -36
- package/components/FilterButton/index.js +0 -1
- package/components/FilterButton/index.js.map +0 -7
- package/components/FollowButton/FollowButton.js +0 -73
- package/components/FollowButton/FollowButton.js.map +0 -7
- package/components/FollowButton/FollowButton.scss +0 -36
- package/components/FollowButton/index.js +0 -1
- package/components/FollowButton/index.js.map +0 -7
- package/components/Search/Search.js +0 -166
- package/components/Search/Search.js.map +0 -7
- package/components/Search/Search.md.scss +0 -4
- package/components/Search/Search.scss +0 -78
- package/components/Search/SearchService.js +0 -48
- package/components/Search/SearchService.js.map +0 -7
- package/components/Search/engines/Engine.js +0 -19
- package/components/Search/engines/Engine.js.map +0 -7
- package/components/Search/engines/StopFinder.js +0 -30
- package/components/Search/engines/StopFinder.js.map +0 -7
- package/components/Search/index.js +0 -3
- package/components/Search/index.js.map +0 -7
- package/components/TrackerControl/TrackerControl.js +0 -116
- package/components/TrackerControl/TrackerControl.js.map +0 -7
- package/components/TrackerControl/TrackerControl.scss +0 -30
- package/components/TrackerControl/index.js +0 -1
- package/components/TrackerControl/index.js.map +0 -7
- package/images/FilterButton/filter.svg +0 -1
- package/images/FollowButton/follow.svg +0 -1
- package/images/baselayer/osm.baselayer.hot.png +0 -0
- package/images/baselayer/osm.baselayer.png +0 -0
- package/utils/KMLFormat.js +0 -69
- package/utils/KMLFormat.js.map +0 -7
package/propTypes.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
const STATE_BOARDING = "BOARDING";
|
|
3
|
+
const STATE_LEAVING = "LEAVING";
|
|
4
|
+
const STATE_PENDING = "PENDING";
|
|
5
|
+
const STATE_TIME_BASED = "TIME_BASED";
|
|
6
|
+
const STATE_STOP_CANCELLED = "STOP_CANCELLED";
|
|
7
|
+
const STATE_JOURNEY_CANCELLED = "JOURNEY_CANCELLED";
|
|
8
|
+
const station = PropTypes.shape({
|
|
9
|
+
aimedArrivalTime: PropTypes.number,
|
|
10
|
+
// time in milliseconds.
|
|
11
|
+
aimedDepartureTime: PropTypes.number,
|
|
12
|
+
// time in milliseconds.
|
|
13
|
+
arrivalDelay: PropTypes.number,
|
|
14
|
+
// time in milliseconds.
|
|
15
|
+
arrivalTime: PropTypes.number,
|
|
16
|
+
// time in milliseconds with the delay included.
|
|
17
|
+
cancelled: PropTypes.bool,
|
|
18
|
+
coordinates: PropTypes.arrayOf(PropTypes.number),
|
|
19
|
+
departureDelay: PropTypes.number,
|
|
20
|
+
// time in milliseconds.
|
|
21
|
+
departureTime: PropTypes.number,
|
|
22
|
+
// time in milliseconds with the delay included
|
|
23
|
+
noDropOff: PropTypes.bool,
|
|
24
|
+
noPickUp: PropTypes.bool,
|
|
25
|
+
state: PropTypes.oneOf([
|
|
26
|
+
null,
|
|
27
|
+
STATE_BOARDING,
|
|
28
|
+
STATE_LEAVING,
|
|
29
|
+
STATE_PENDING,
|
|
30
|
+
STATE_TIME_BASED,
|
|
31
|
+
STATE_STOP_CANCELLED,
|
|
32
|
+
STATE_JOURNEY_CANCELLED
|
|
33
|
+
]),
|
|
34
|
+
stationId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
35
|
+
stationName: PropTypes.string,
|
|
36
|
+
wheelchairAccessible: PropTypes.bool
|
|
37
|
+
});
|
|
38
|
+
const lineInfos = PropTypes.shape({
|
|
39
|
+
backgroundColor: PropTypes.string,
|
|
40
|
+
bicyclesAllowed: PropTypes.bool,
|
|
41
|
+
color: PropTypes.string,
|
|
42
|
+
destination: PropTypes.string,
|
|
43
|
+
feedsId: PropTypes.number,
|
|
44
|
+
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
45
|
+
license: PropTypes.string,
|
|
46
|
+
licenseNote: PropTypes.string,
|
|
47
|
+
licenseUrl: PropTypes.string,
|
|
48
|
+
longName: PropTypes.string,
|
|
49
|
+
operatingInformations: PropTypes.object,
|
|
50
|
+
operator: PropTypes.string,
|
|
51
|
+
operatorTimeZone: PropTypes.string,
|
|
52
|
+
operatorUrl: PropTypes.string,
|
|
53
|
+
publisher: PropTypes.string,
|
|
54
|
+
publisherTimeZone: PropTypes.string,
|
|
55
|
+
publisherUrl: PropTypes.string,
|
|
56
|
+
realTime: PropTypes.number,
|
|
57
|
+
shortName: PropTypes.string,
|
|
58
|
+
stations: PropTypes.arrayOf(station),
|
|
59
|
+
vehicleType: PropTypes.number,
|
|
60
|
+
wheelchairAccessible: PropTypes.bool
|
|
61
|
+
});
|
|
62
|
+
export default {
|
|
63
|
+
lineInfos,
|
|
64
|
+
STATE_BOARDING,
|
|
65
|
+
STATE_LEAVING,
|
|
66
|
+
station
|
|
67
|
+
};
|
package/propTypes.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/propTypes.js"],
|
|
4
|
+
"sourcesContent": ["import PropTypes from \"prop-types\";\n\nconst STATE_BOARDING = \"BOARDING\";\nconst STATE_LEAVING = \"LEAVING\";\nconst STATE_PENDING = \"PENDING\";\nconst STATE_TIME_BASED = \"TIME_BASED\";\nconst STATE_STOP_CANCELLED = \"STOP_CANCELLED\";\nconst STATE_JOURNEY_CANCELLED = \"JOURNEY_CANCELLED\";\n\nconst station = PropTypes.shape({\n aimedArrivalTime: PropTypes.number, // time in milliseconds.\n aimedDepartureTime: PropTypes.number, // time in milliseconds.\n arrivalDelay: PropTypes.number, // time in milliseconds.\n arrivalTime: PropTypes.number, // time in milliseconds with the delay included.\n cancelled: PropTypes.bool,\n coordinates: PropTypes.arrayOf(PropTypes.number),\n departureDelay: PropTypes.number, // time in milliseconds.\n departureTime: PropTypes.number, // time in milliseconds with the delay included\n noDropOff: PropTypes.bool,\n noPickUp: PropTypes.bool,\n state: PropTypes.oneOf([\n null,\n STATE_BOARDING,\n STATE_LEAVING,\n STATE_PENDING,\n STATE_TIME_BASED,\n STATE_STOP_CANCELLED,\n STATE_JOURNEY_CANCELLED,\n ]),\n stationId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n stationName: PropTypes.string,\n wheelchairAccessible: PropTypes.bool,\n});\n\nconst lineInfos = PropTypes.shape({\n backgroundColor: PropTypes.string,\n bicyclesAllowed: PropTypes.bool,\n color: PropTypes.string,\n destination: PropTypes.string,\n feedsId: PropTypes.number,\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n license: PropTypes.string,\n licenseNote: PropTypes.string,\n licenseUrl: PropTypes.string,\n longName: PropTypes.string,\n operatingInformations: PropTypes.object,\n operator: PropTypes.string,\n operatorTimeZone: PropTypes.string,\n operatorUrl: PropTypes.string,\n publisher: PropTypes.string,\n publisherTimeZone: PropTypes.string,\n publisherUrl: PropTypes.string,\n realTime: PropTypes.number,\n shortName: PropTypes.string,\n stations: PropTypes.arrayOf(station),\n vehicleType: PropTypes.number,\n wheelchairAccessible: PropTypes.bool,\n});\n\nexport default {\n lineInfos,\n STATE_BOARDING,\n STATE_LEAVING,\n station,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,eAAe;AAEtB,MAAM,iBAAiB;AACvB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,mBAAmB;AACzB,MAAM,uBAAuB;AAC7B,MAAM,0BAA0B;AAEhC,MAAM,UAAU,UAAU,MAAM;AAAA,EAC9B,kBAAkB,UAAU;AAAA;AAAA,EAC5B,oBAAoB,UAAU;AAAA;AAAA,EAC9B,cAAc,UAAU;AAAA;AAAA,EAC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 @@
|
|
|
1
|
+
import ResizeObserver from "resize-observer-polyfill";
|
|
2
|
+
global.URL.createObjectURL = jest.fn(() => {
|
|
3
|
+
return "fooblob";
|
|
4
|
+
});
|
|
5
|
+
global.ResizeObserver = ResizeObserver;
|
|
6
|
+
const noop = () => {
|
|
7
|
+
};
|
|
8
|
+
class Worker {
|
|
9
|
+
onmessage;
|
|
10
|
+
url;
|
|
11
|
+
constructor(stringUrl) {
|
|
12
|
+
this.url = stringUrl;
|
|
13
|
+
this.onmessage = noop;
|
|
14
|
+
}
|
|
15
|
+
postMessage(msg) {
|
|
16
|
+
this.onmessage(msg);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(window, "Worker", {
|
|
20
|
+
value: Worker,
|
|
21
|
+
writable: true
|
|
22
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/setupTests.js"],
|
|
4
|
+
"sourcesContent": ["import ResizeObserver from \"resize-observer-polyfill\";\n\nglobal.URL.createObjectURL = jest.fn(() => {\n return \"fooblob\";\n});\n\nglobal.ResizeObserver = ResizeObserver;\n\nconst noop = () => {};\n\nclass Worker {\n onmessage;\n\n url;\n\n constructor(stringUrl) {\n this.url = stringUrl;\n this.onmessage = noop;\n }\n\n postMessage(msg) {\n this.onmessage(msg);\n }\n}\n\nObject.defineProperty(window, \"Worker\", {\n value: Worker,\n writable: true,\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,oBAAoB;AAE3B,OAAO,IAAI,kBAAkB,KAAK,GAAG,MAAM;AACzC,SAAO;AACT,CAAC;AAED,OAAO,iBAAiB;AAExB,MAAM,OAAO,MAAM;AAAC;AAEpB,MAAM,OAAO;AAAA,EACX;AAAA,EAEA;AAAA,EAEA,YAAY,WAAW;AACrB,SAAK,MAAM;AACX,SAAK,YAAY;AAAA,EACnB;AAAA,EAEA,YAAY,KAAK;AACf,SAAK,UAAU,GAAG;AAAA,EACpB;AACF;AAEA,OAAO,eAAe,QAAQ,UAAU;AAAA,EACtC,OAAO;AAAA,EACP,UAAU;AACZ,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/themes/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Themes
|
|
2
|
+
|
|
3
|
+
We are NOT a CSS library so we provide some default CSS helpers to help you start but feel free to use your own technology bootstrap or JSS or styled-compoennts.
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
We provide a set of CSS variables and classes to help you start using `react-spatial` .
|
|
8
|
+
To use it just import the `index.scss` file of the `default` theme in your application:
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import 'react-spatial/themes/default/index.scss';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
If you want to override variables just import the `default/variables.css` and the default CSS files you want, there is one CSS file by component.
|
|
15
|
+
|
|
16
|
+
## Create a new theme
|
|
17
|
+
|
|
18
|
+
Just add a folder with an `index.scss` file.
|
|
19
|
+
|
|
20
|
+
Some rules must be followed:
|
|
21
|
+
|
|
22
|
+
- no positionning css for container.
|
|
23
|
+
- no size information without using CSS variable.
|
|
24
|
+
- use `display: flex` for container when possible.
|
|
25
|
+
|
|
26
|
+
Of course those rules must be adapted depending on the component.
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file load the css of components.
|
|
3
3
|
*/
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
7
|
-
@
|
|
8
|
-
@
|
|
9
|
-
@
|
|
10
|
-
@
|
|
11
|
-
@
|
|
12
|
-
@
|
|
13
|
-
@import '../../components/RouteSchedule/RouteSchedule.scss';
|
|
14
|
-
@import '../../components/TrackerControl/TrackerControl.scss';
|
|
15
|
-
@import '../../components/Search/Search.scss';
|
|
16
|
-
@import '../../components/Overlay/Overlay.scss';
|
|
4
|
+
@use '../../components/BaseLayerSwitcher/BaseLayerSwitcher';
|
|
5
|
+
@use '../../components/Geolocation/Geolocation';
|
|
6
|
+
@use '../../components/LayerTree/LayerTree';
|
|
7
|
+
@use '../../components/NorthArrow/NorthArrow';
|
|
8
|
+
@use '../../components/Popup/Popup';
|
|
9
|
+
@use '../../components/ScaleLine/ScaleLine';
|
|
10
|
+
@use '../../components/Zoom/Zoom';
|
|
11
|
+
@use '../../components/RouteSchedule/RouteSchedule';
|
|
12
|
+
@use '../../components/Overlay/Overlay';
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file is loaded by the styleguide and provide additionnal css for all examples.
|
|
3
3
|
*/
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
7
|
-
@
|
|
8
|
-
@
|
|
9
|
-
@
|
|
10
|
-
@
|
|
11
|
-
@
|
|
12
|
-
@
|
|
13
|
-
@
|
|
14
|
-
@
|
|
15
|
-
@
|
|
16
|
-
@
|
|
17
|
-
@
|
|
18
|
-
@
|
|
19
|
-
@
|
|
4
|
+
@use 'index';
|
|
5
|
+
@use 'variables';
|
|
6
|
+
@use 'mixins';
|
|
7
|
+
@use '../../components/BaseLayerSwitcher/BaseLayerSwitcher.md';
|
|
8
|
+
@use '../../components/BasicMap/BasicMap.md';
|
|
9
|
+
@use '../../components/CanvasSaveButton/CanvasSaveButton.md';
|
|
10
|
+
@use '../../components/FeatureExportButton/FeatureExportButton.md';
|
|
11
|
+
@use '../../components/FitExtent/FitExtent.md';
|
|
12
|
+
@use '../../components/Geolocation/Geolocation.md';
|
|
13
|
+
@use '../../components/LayerTree/LayerTree.md';
|
|
14
|
+
@use '../../components/MousePosition/MousePosition.md';
|
|
15
|
+
@use '../../components/Permalink/Permalink.md';
|
|
16
|
+
@use '../../components/Popup/Popup.md';
|
|
17
|
+
@use '../../components/Zoom/Zoom.md';
|
|
18
|
+
@use '../../components/RouteSchedule/RouteSchedule.md';
|
|
19
|
+
@use '../../components/Copyright/Copyright.md';
|
|
20
|
+
@use '../../components/Overlay/Overlay.md';
|
|
20
21
|
|
|
21
22
|
$link-color: #000;
|
|
22
23
|
$link-color-hover: #000;
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
@include a;
|
|
25
|
+
/* Load 'a' mixin */
|
|
26
|
+
@include mixins.a();
|
|
26
27
|
|
|
27
28
|
a {
|
|
28
29
|
font-size: 11px;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
body {
|
|
32
|
-
font-family:
|
|
33
|
+
font-family: variables.$font-family;
|
|
33
34
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file load the default theme, for all the components.
|
|
3
3
|
*/
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
4
|
+
@use 'variables';
|
|
5
|
+
@use 'mixins';
|
|
6
|
+
@use 'components';
|
|
7
7
|
|
|
8
8
|
[role='button']:not([disabled]),
|
|
9
9
|
button:not([disabled]),
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "variables";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* This file defines mixins.
|
|
3
5
|
*/
|
|
@@ -7,16 +9,16 @@
|
|
|
7
9
|
*/
|
|
8
10
|
@mixin a() {
|
|
9
11
|
a {
|
|
10
|
-
color:
|
|
11
|
-
text-decoration:
|
|
12
|
+
color: variables.$link-color;
|
|
13
|
+
text-decoration: variables.$link-decoration;
|
|
12
14
|
|
|
13
15
|
&:hover {
|
|
14
|
-
color:
|
|
15
|
-
text-decoration:
|
|
16
|
+
color: variables.$link-color-hover;
|
|
17
|
+
text-decoration: variables.$link-decoration-hover;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
&:active {
|
|
19
|
-
color:
|
|
21
|
+
color: variables.$link-color-active;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
&.rs-selected {
|
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file defines variables.
|
|
3
3
|
*/
|
|
4
|
+
@use "sass:color";
|
|
5
|
+
@use "sass:math";
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
$brand-primary: #
|
|
7
|
+
/* Color */
|
|
8
|
+
$brand-primary: #000;
|
|
7
9
|
$brand-secondary: #003d85;
|
|
8
10
|
$gray-base: #000;
|
|
9
|
-
$gray-lighter:
|
|
10
|
-
$gray-light:
|
|
11
|
-
$gray:
|
|
12
|
-
$gray-dark:
|
|
13
|
-
$gray-darker:
|
|
11
|
+
$gray-lighter: color.adjust($gray-base, $lightness: 93.5%);
|
|
12
|
+
$gray-light: color.adjust($gray-base, $lightness: 46.7%);
|
|
13
|
+
$gray: color.adjust($gray-base,$lightness: 33.5%);
|
|
14
|
+
$gray-dark: color.adjust($gray-base, $lightness: 20%);
|
|
15
|
+
$gray-darker: color.adjust($gray-base, $lightness: 13.5%);
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
/* Text */
|
|
16
18
|
$font-family: arial, sans-serif;
|
|
17
19
|
$font-family-bold: arial, sans-serif;
|
|
18
20
|
$font-size-base: 15px;
|
|
19
|
-
$font-size-small: ceil($font-size-base * 0.85);
|
|
20
|
-
$font-size-large: ceil($font-size-base * 1.25);
|
|
21
|
+
$font-size-small: math.ceil($font-size-base * 0.85);
|
|
22
|
+
$font-size-large: math.ceil($font-size-base * 1.25);
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
$box-shadow: 0 1px 4px
|
|
24
|
+
/* Shadow */
|
|
25
|
+
$box-shadow: 0 1px 4px rgb(0 0 0 / 20%);
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
/* Padding */
|
|
26
28
|
$padding-base: 5px;
|
|
27
29
|
$padding-base-vertical: 5px;
|
|
28
30
|
$padding-base-horizontal: 5px;
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
/* Link */
|
|
31
33
|
$link-color: $brand-primary;
|
|
32
|
-
$link-color-hover:
|
|
33
|
-
$link-color-active:
|
|
34
|
+
$link-color-hover: color.adjust($brand-primary,$lightness: -10%);
|
|
35
|
+
$link-color-active: color.adjust($brand-primary, $lightness: -5%);
|
|
34
36
|
$link-decoration: none;
|
|
35
37
|
$link-decoration-hover: underline;
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
/* Buttons */
|
|
38
40
|
$btn-primary-color: $brand-primary;
|
|
39
|
-
$btn-primary-color-hover:
|
|
40
|
-
$btn-primary-color-active:
|
|
41
|
+
$btn-primary-color-hover: color.adjust($brand-primary, $lightness: -10%);
|
|
42
|
+
$btn-primary-color-active: color.adjust($brand-primary, $lightness: -5%);
|
|
41
43
|
$btn-secondary-color: $brand-secondary;
|
|
42
|
-
$btn-secondary-color-hover:
|
|
43
|
-
$btn-secondary-color-active:
|
|
44
|
+
$btn-secondary-color-hover: color.adjust($btn-secondary-color, $lightness: -10%);
|
|
45
|
+
$btn-secondary-color-active: color.adjust($btn-secondary-color, $lightness: -5%);
|
|
44
46
|
$btn-size-base: 50px;
|
|
45
|
-
$btn-size-small: ceil($btn-size-base * 0.85);
|
|
46
|
-
$btn-size-large: ceil($btn-size-base * 1.25);
|
|
47
|
+
$btn-size-small: math.ceil($btn-size-base * 0.85);
|
|
48
|
+
$btn-size-large: math.ceil($btn-size-base * 1.25);
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
/* Z-index */
|
|
49
51
|
$zindex-base: 0;
|
|
50
52
|
$zindex-lower: 200;
|
|
51
53
|
$zindex-low: 400;
|
|
52
54
|
$zindex-high: 600;
|
|
53
55
|
$zindex-higher: 800;
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
/* Others */
|
|
56
58
|
$header-height: 55px;
|
|
57
59
|
$footer-height: 25px;
|
|
58
60
|
$sidebar-open-width: 200px;
|
package/utils/GlobalsForOle.js
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import Draw from "ol/interaction/Draw";
|
|
5
|
-
import Snap from "ol/interaction/Snap";
|
|
6
|
-
import Pointer from "ol/interaction/Pointer";
|
|
7
|
-
import Select from "ol/interaction/Select";
|
|
8
|
-
import Modify from "ol/interaction/Modify";
|
|
9
|
-
import Style from "ol/style/Style";
|
|
10
|
-
import Fill from "ol/style/Fill";
|
|
11
|
-
import Stroke from "ol/style/Stroke";
|
|
12
|
-
import Circle from "ol/style/Circle";
|
|
13
|
-
import Icon from "ol/style/Icon";
|
|
14
|
-
import RegularShape from "ol/style/RegularShape";
|
|
1
|
+
import { OL3Parser } from "jsts/org/locationtech/jts/io";
|
|
2
|
+
import { BufferOp } from "jsts/org/locationtech/jts/operation/buffer";
|
|
3
|
+
import { OverlayOp } from "jsts/org/locationtech/jts/operation/overlay";
|
|
15
4
|
import Collection from "ol/Collection";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
5
|
+
import Control from "ol/control/Control";
|
|
6
|
+
import * as events from "ol/events";
|
|
7
|
+
import * as condition from "ol/events/condition";
|
|
18
8
|
import { getCenter } from "ol/extent";
|
|
9
|
+
import Feature from "ol/Feature";
|
|
19
10
|
import {
|
|
20
|
-
Point,
|
|
21
11
|
LineString,
|
|
22
|
-
Polygon,
|
|
23
|
-
MultiPoint,
|
|
24
12
|
MultiLineString,
|
|
25
|
-
|
|
13
|
+
MultiPoint,
|
|
14
|
+
MultiPolygon,
|
|
15
|
+
Point,
|
|
16
|
+
Polygon
|
|
26
17
|
} from "ol/geom";
|
|
27
18
|
import LinearRing from "ol/geom/LinearRing";
|
|
28
19
|
import { fromExtent } from "ol/geom/Polygon";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
20
|
+
import Draw from "ol/interaction/Draw";
|
|
21
|
+
import Modify from "ol/interaction/Modify";
|
|
22
|
+
import Pointer from "ol/interaction/Pointer";
|
|
23
|
+
import Select from "ol/interaction/Select";
|
|
24
|
+
import Snap from "ol/interaction/Snap";
|
|
25
|
+
import OLVectorLayer from "ol/layer/Vector";
|
|
26
|
+
import Observable, { unByKey } from "ol/Observable";
|
|
27
|
+
import VectorSource from "ol/source/Vector";
|
|
28
|
+
import Circle from "ol/style/Circle";
|
|
29
|
+
import Fill from "ol/style/Fill";
|
|
30
|
+
import Icon from "ol/style/Icon";
|
|
31
|
+
import RegularShape from "ol/style/RegularShape";
|
|
32
|
+
import Stroke from "ol/style/Stroke";
|
|
33
|
+
import Style from "ol/style/Style";
|
|
34
34
|
if (!window.ol) {
|
|
35
35
|
window.ol = {
|
|
36
|
-
Feature,
|
|
37
36
|
Collection,
|
|
38
|
-
layer: {
|
|
39
|
-
Vector: OLVectorLayer
|
|
40
|
-
},
|
|
41
|
-
source: {
|
|
42
|
-
Vector: VectorSource
|
|
43
|
-
},
|
|
44
|
-
interaction: {
|
|
45
|
-
Draw,
|
|
46
|
-
Snap,
|
|
47
|
-
Pointer,
|
|
48
|
-
Select,
|
|
49
|
-
Modify
|
|
50
|
-
},
|
|
51
37
|
control: {
|
|
52
38
|
Control
|
|
53
39
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
RegularShape,
|
|
60
|
-
Icon
|
|
40
|
+
events: {
|
|
41
|
+
...events,
|
|
42
|
+
condition: {
|
|
43
|
+
...condition
|
|
44
|
+
}
|
|
61
45
|
},
|
|
46
|
+
extent: {
|
|
47
|
+
getCenter
|
|
48
|
+
},
|
|
49
|
+
Feature,
|
|
62
50
|
geom: {
|
|
63
|
-
|
|
51
|
+
LinearRing,
|
|
64
52
|
LineString,
|
|
65
|
-
Polygon,
|
|
66
|
-
MultiPoint,
|
|
67
53
|
MultiLineString,
|
|
54
|
+
MultiPoint,
|
|
68
55
|
MultiPolygon,
|
|
69
|
-
|
|
56
|
+
Point,
|
|
57
|
+
Polygon
|
|
70
58
|
},
|
|
71
|
-
|
|
72
|
-
|
|
59
|
+
interaction: {
|
|
60
|
+
Draw,
|
|
61
|
+
Modify,
|
|
62
|
+
Pointer,
|
|
63
|
+
Select,
|
|
64
|
+
Snap
|
|
65
|
+
},
|
|
66
|
+
layer: {
|
|
67
|
+
Vector: OLVectorLayer
|
|
73
68
|
},
|
|
74
69
|
Observable: {
|
|
75
70
|
...Observable,
|
|
76
71
|
unByKey
|
|
77
72
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
source: {
|
|
74
|
+
Vector: VectorSource
|
|
75
|
+
},
|
|
76
|
+
style: {
|
|
77
|
+
Circle,
|
|
78
|
+
Fill,
|
|
79
|
+
Icon,
|
|
80
|
+
RegularShape,
|
|
81
|
+
Stroke,
|
|
82
|
+
Style
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
window.ol.geom.Polygon.fromExtent = fromExtent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/GlobalsForOle.js"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": "AAAA,
|
|
4
|
+
"sourcesContent": ["import { OL3Parser } from \"jsts/org/locationtech/jts/io\";\nimport { BufferOp } from \"jsts/org/locationtech/jts/operation/buffer\";\nimport { OverlayOp } from \"jsts/org/locationtech/jts/operation/overlay\";\nimport Collection from \"ol/Collection\";\nimport Control from \"ol/control/Control\";\nimport * as events from \"ol/events\";\nimport * as condition from \"ol/events/condition\";\nimport { getCenter } from \"ol/extent\";\nimport Feature from \"ol/Feature\";\nimport {\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from \"ol/geom\";\nimport LinearRing from \"ol/geom/LinearRing\";\nimport { fromExtent } from \"ol/geom/Polygon\";\nimport Draw from \"ol/interaction/Draw\";\nimport Modify from \"ol/interaction/Modify\";\nimport Pointer from \"ol/interaction/Pointer\";\nimport Select from \"ol/interaction/Select\";\nimport Snap from \"ol/interaction/Snap\";\nimport OLVectorLayer from \"ol/layer/Vector\";\nimport Observable, { unByKey } from \"ol/Observable\";\nimport VectorSource from \"ol/source/Vector\";\nimport Circle from \"ol/style/Circle\";\nimport Fill from \"ol/style/Fill\";\nimport Icon from \"ol/style/Icon\";\nimport RegularShape from \"ol/style/RegularShape\";\nimport Stroke from \"ol/style/Stroke\";\nimport Style from \"ol/style/Style\";\n\n/**\n * This module create window.ol and window.jsts variables for ole editor.\n */\nif (!window.ol) {\n window.ol = {\n Collection,\n control: {\n Control,\n },\n events: {\n ...events,\n condition: {\n ...condition,\n },\n },\n extent: {\n getCenter,\n },\n Feature,\n geom: {\n LinearRing,\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n },\n interaction: {\n Draw,\n Modify,\n Pointer,\n Select,\n Snap,\n },\n layer: {\n Vector: OLVectorLayer,\n },\n Observable: {\n ...Observable,\n unByKey,\n },\n source: {\n Vector: VectorSource,\n },\n style: {\n Circle,\n Fill,\n Icon,\n RegularShape,\n Stroke,\n Style,\n },\n };\n window.ol.geom.Polygon.fromExtent = fromExtent;\n}\n\nif (!window.jsts) {\n window.jsts = {\n io: {\n OL3Parser,\n },\n operation: { buffer: { BufferOp }, overlay: { OverlayOp } },\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,OAAO,gBAAgB;AACvB,OAAO,aAAa;AACpB,YAAY,YAAY;AACxB,YAAY,eAAe;AAC3B,SAAS,iBAAiB;AAC1B,OAAO,aAAa;AACpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,gBAAgB;AACvB,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AACjB,OAAO,YAAY;AACnB,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,mBAAmB;AAC1B,OAAO,cAAc,eAAe;AACpC,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACnB,OAAO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