Skip to content

Commit e470657

Browse files
offtherailzTobia Di Pisa
authored andcommitted
Update timeline frame duration to 2s, enabled measure to annotation (#4071)
1 parent 479cb80 commit e470657

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

web/client/localConfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,12 @@
296296
"AddGroup",
297297
"TOCItemsSettings",
298298
"Tutorial", "MapFooter", {
299-
"name": "Measure"
299+
"name": "Measure",
300+
"cfg": {
301+
"defaultOptions": {
302+
"showAddAsAnnotation": true
303+
}
304+
}
300305
}, "Print", "MapImport", "MapExport", {
301306
"name": "Settings",
302307
"cfg": {

web/client/reducers/playback.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ const { PLAY, PAUSE, STOP, STATUS, SET_FRAMES, APPEND_FRAMES, FRAMES_LOADING, SE
22
const { RESET_CONTROLS } = require('../actions/controls');
33
const { set } = require('../utils/ImmutableUtils');
44

5-
module.exports = (state = { status: STATUS.STOP, currentFrame: -1, settings: {
5+
const DEFAULT_SETTINGS = {
66
timeStep: 1,
77
stepUnit: "days",
88
frameDuration: 2,
99
following: true
10-
}}, action) => {
10+
};
11+
12+
module.exports = (state = { status: STATUS.STOP, currentFrame: -1, settings: DEFAULT_SETTINGS}, action) => {
1113
switch (action.type) {
1214
case PLAY: {
1315
return set(`status`, STATUS.PLAY, state);
@@ -48,12 +50,7 @@ module.exports = (state = { status: STATUS.STOP, currentFrame: -1, settings: {
4850
}
4951
case RESET_CONTROLS: {
5052
return set('metadata', undefined, set('framesLoading', undefined, set('playbackRange', undefined, set('frames', undefined,
51-
set('currentFrame', -1, set('status', "STOP", set('settings', {
52-
timeStep: 1,
53-
stepUnit: "days",
54-
frameDuration: 5,
55-
following: true
56-
}, state)
53+
set('currentFrame', -1, set('status', "STOP", set('settings', DEFAULT_SETTINGS, state)
5754
))))));
5855
}
5956
default:

0 commit comments

Comments
 (0)