-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:makinacorpus/accessimap-lecteur-der
- Loading branch information
Showing
13 changed files
with
162 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>Lecteur Accessimap</name> | ||
<widget id="com.makinacorpus.mapsense" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | ||
<name>MapSense</name> | ||
<description> | ||
Accessimap - Lecteur de documents en relief. | ||
MapSense - Lecteur de documents en relief. | ||
</description> | ||
<author email="[email protected]" href="http://makina-corpus.com"> | ||
Makina Corpus | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
/// <reference path="../.vscode/typings/cordova/plugins/Splashscreen.d.ts"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// import { | ||
// SET_OPTION, | ||
// INIT_CONFIG | ||
// } from '../store/actions'; | ||
// import { | ||
// defaultState | ||
// } from '../store/reducers'; | ||
|
||
/** | ||
* Middleware for resize application container to fit with DER. | ||
*/ | ||
const reader = state => next => action => { | ||
console.log(action) | ||
if (action.type === '@@router/LOCATION_CHANGE') { | ||
switch (action.payload.pathname) { | ||
case '/menu': | ||
console.log('MENUUUU', state.appReducer) | ||
if (state.appReducer && state.appReducer.config.tts) { | ||
console.log('oo') | ||
state.appReducer.config.tts.speak('une voie qui annonce le menu') | ||
} | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
} | ||
next(action); | ||
}; | ||
|
||
export default reader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { LOCATION_CHANGE } from 'react-router-redux'; | ||
import { | ||
SET_OPTION, | ||
INIT_CONFIG | ||
} from '../store/actions'; | ||
import { | ||
defaultState | ||
} from '../store/reducers'; | ||
|
||
let Reader = null; | ||
|
||
/** | ||
* Middleware for resize application container to fit with DER. | ||
*/ | ||
export const screenCalibrate = () => next => action => { | ||
switch (action.type) { | ||
case SET_OPTION: | ||
if (action.name === 'format') { | ||
document.getElementById('der-reader').className = action.value; | ||
} | ||
|
||
if (action.name === 'dpi') { | ||
document.body.style.fontSize = action.value + 'px'; | ||
} | ||
|
||
if (action.name === 'tts') { | ||
Reader = action.value; | ||
} | ||
break; | ||
case INIT_CONFIG: | ||
var { format, dpi } = action.value; | ||
document.getElementById('der-reader').className = format ? format : action.default.format; | ||
document.body.style.fontSize = dpi ? dpi + 'px' : defaultState.config.dpi + 'px'; | ||
break; | ||
default: | ||
break; | ||
} | ||
next(action); | ||
}; | ||
|
||
/** | ||
* Middleware for resize application container to fit with DER. | ||
*/ | ||
export const screenReader = () => next => action => { | ||
if (action.type === LOCATION_CHANGE && Reader) { | ||
switch (action.payload.pathname) { | ||
case 'menu': | ||
Reader.speak('Ouverture du menu'); | ||
break; | ||
case 'filters': | ||
Reader.speak('Ouverture des filtres'); | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
next(action); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.