mobility-toolbox-js 1.7.11 → 1.7.14
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 +1 -1
- package/common/utils/delayTrackerStyle.js +6 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Toolbox for JavaScript applications in the domains of mobility and logistics.
|
|
4
4
|
The tools in this library have been inspired by many projects realized for public transport agencies, mobility providers and logistics companies.
|
|
5
5
|
|
|
6
|
-
[](https://www.npmjs.com/package/mobility-toolbox-js)
|
|
7
7
|
[](https://github.com/geops/mobility-toolbox-js/actions?query=workflow%3ABuild)
|
|
8
8
|
[](https://app.netlify.com/sites/mobility-toolbox-js/deploys)
|
|
9
9
|
|
|
@@ -158,14 +158,18 @@ const style = (trajectory, viewState, options) => {
|
|
|
158
158
|
} = options;
|
|
159
159
|
|
|
160
160
|
const { zoom, pixelRatio } = viewState;
|
|
161
|
-
let { line, type } = trajectory.properties;
|
|
161
|
+
let { line, type, cancelled } = trajectory.properties;
|
|
162
162
|
const {
|
|
163
163
|
train_id: id,
|
|
164
164
|
delay,
|
|
165
|
-
|
|
165
|
+
state,
|
|
166
166
|
operator_provides_realtime_journey: operatorProvidesRealtime,
|
|
167
167
|
} = trajectory.properties;
|
|
168
168
|
|
|
169
|
+
// In the future, the cancelled property will be removed we still managed it
|
|
170
|
+
// until the backend change is on prod.
|
|
171
|
+
cancelled = cancelled === true || state === 'JOURNEY_CANCELLED';
|
|
172
|
+
|
|
169
173
|
if (!type) {
|
|
170
174
|
type = 'Rail';
|
|
171
175
|
}
|