Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
a996e978
Commit
a996e978
authored
Mar 20, 2018
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update naming in `store/index` following previous restructuring
parent
8bb28c60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
index.js
src/sidebar/store/index.js
+23
-23
No files found.
src/sidebar/store/index.js
View file @
a996e978
'use strict'
;
/**
*
AnnotationUI is the central store of state for the sidebar application,
*
managed using
[Redux](http://redux.js.org/).
*
Central store of state for the sidebar application, managed using
* [Redux](http://redux.js.org/).
*
* State management in Redux apps work as follows:
*
...
...
@@ -36,16 +36,16 @@ var redux = require('redux');
// `.default` is needed because 'redux-thunk' is built as an ES2015 module
var
thunk
=
require
(
'redux-thunk'
).
default
;
var
reducers
=
require
(
'../reducers'
);
var
annotationsReducer
=
require
(
'./modules/annotations'
);
var
framesReducer
=
require
(
'./modules/frames'
);
var
linksReducer
=
require
(
'./modules/links'
);
var
selectionReducer
=
require
(
'./modules/selection'
);
var
sessionReducer
=
require
(
'./modules/session'
);
var
viewerReducer
=
require
(
'./modules/viewer'
);
var
util
=
require
(
'./util'
);
var
modules
=
require
(
'./modules'
);
var
annotationsModule
=
require
(
'./modules/annotations'
);
var
framesModule
=
require
(
'./modules/frames'
);
var
linksModule
=
require
(
'./modules/links'
);
var
selectionModule
=
require
(
'./modules/selection'
);
var
sessionModule
=
require
(
'./modules/session'
);
var
viewerModule
=
require
(
'./modules/viewer'
);
var
debugMiddleware
=
require
(
'./debug-middleware'
);
var
util
=
require
(
'./util'
);
/**
* Redux middleware which triggers an Angular change-detection cycle
...
...
@@ -85,7 +85,7 @@ function store($rootScope, settings) {
debugMiddleware
,
angularDigestMiddleware
.
bind
(
null
,
$rootScope
)
);
var
store
=
redux
.
createStore
(
reducers
.
update
,
reducer
s
.
init
(
settings
),
var
store
=
redux
.
createStore
(
modules
.
update
,
module
s
.
init
(
settings
),
enhancer
);
// Expose helper functions that create actions as methods of the
...
...
@@ -97,12 +97,12 @@ function store($rootScope, settings) {
// annotationUI.addAnnotations(annotations)
//
var
actionCreators
=
redux
.
bindActionCreators
(
Object
.
assign
({},
annotations
Reducer
.
actions
,
frames
Reducer
.
actions
,
links
Reducer
.
actions
,
selection
Reducer
.
actions
,
session
Reducer
.
actions
,
viewer
Reducer
.
actions
annotations
Module
.
actions
,
frames
Module
.
actions
,
links
Module
.
actions
,
selection
Module
.
actions
,
session
Module
.
actions
,
viewer
Module
.
actions
),
store
.
dispatch
);
// Expose selectors as methods of the `annotationUI` to make using them easier
...
...
@@ -113,12 +113,12 @@ function store($rootScope, settings) {
// You can use:
// annotationUI.isAnnotationSelected(id)
var
selectors
=
util
.
bindSelectors
(
Object
.
assign
({},
annotations
Reducer
.
selectors
,
frames
Reducer
.
selectors
,
links
Reducer
.
selectors
,
selection
Reducer
.
selectors
,
session
Reducer
.
selectors
,
viewer
Reducer
.
selectors
annotations
Module
.
selectors
,
frames
Module
.
selectors
,
links
Module
.
selectors
,
selection
Module
.
selectors
,
session
Module
.
selectors
,
viewer
Module
.
selectors
),
store
.
getState
);
return
Object
.
assign
(
store
,
actionCreators
,
selectors
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment