11import core from 'core' ;
22import getHashParams from 'helpers/getHashParams' ;
33import getAnnotationRelatedElements from 'helpers/getAnnotationRelatedElements' ;
4- import { HIGH_PRIORITY , LOW_PRIORITY } from 'constants/actionPriority' ;
4+ import { PRIORITY_THREE , PRIORITY_ONE } from 'constants/actionPriority' ;
55import actions from 'actions' ;
66
77export default store => {
@@ -19,7 +19,7 @@ export default store => {
1919const disableElementsPassedByConstructor = ( state , dispatch ) => {
2020 if ( state . advanced . defaultDisabledElements ) {
2121 const elements = state . advanced . defaultDisabledElements . split ( ',' ) ;
22- dispatch ( actions . disableElements ( elements , HIGH_PRIORITY ) ) ;
22+ dispatch ( actions . disableElements ( elements , PRIORITY_THREE ) ) ;
2323 }
2424} ;
2525
@@ -30,7 +30,7 @@ const disableElementsIfReadOnly = (state, dispatch) => {
3030 ...getAnnotationRelatedElements ( state )
3131 ] ;
3232
33- dispatch ( actions . disableElements ( elements , LOW_PRIORITY ) ) ;
33+ dispatch ( actions . disableElements ( elements , PRIORITY_ONE ) ) ;
3434 core . setToolMode ( 'AnnotationEdit' ) ;
3535 }
3636} ;
@@ -44,7 +44,7 @@ const disableElementsIfAnnotationDisabled = (state, dispatch) => {
4444 ...getAnnotationRelatedElements ( state ) ,
4545 ] ;
4646
47- dispatch ( actions . disableElements ( elements , LOW_PRIORITY ) ) ;
47+ dispatch ( actions . disableElements ( elements , PRIORITY_ONE ) ) ;
4848 }
4949} ;
5050
@@ -57,7 +57,7 @@ const disableElementsIfFilePickerDisabled = dispatch => {
5757 'filePickerButton' ,
5858 ] ;
5959
60- dispatch ( actions . disableElements ( elements , LOW_PRIORITY ) ) ;
60+ dispatch ( actions . disableElements ( elements , PRIORITY_ONE ) ) ;
6161 }
6262} ;
6363
@@ -71,14 +71,14 @@ const disableElementsIfHideAnnotationPanel = dispatch => {
7171 'annotationCommentButton'
7272 ] ;
7373
74- dispatch ( actions . disableElements ( elements , LOW_PRIORITY ) ) ;
74+ dispatch ( actions . disableElements ( elements , PRIORITY_ONE ) ) ;
7575 }
7676} ;
7777
7878const disableElementsIfToolBarDisabled = dispatch => {
7979 const toolBarDisabled = ! getHashParams ( 'toolbar' , true ) ;
8080
8181 if ( toolBarDisabled ) {
82- dispatch ( actions . disableElement ( 'header' , LOW_PRIORITY ) ) ;
82+ dispatch ( actions . disableElement ( 'header' , PRIORITY_ONE ) ) ;
8383 }
8484} ;
0 commit comments