Skip to content
Snippets Groups Projects
Commit 03d9d052 authored by chris's avatar chris
Browse files

better track tracking in notes

parent bfb56f20
No related branches found
No related tags found
1 merge request!117Current features fixes
......@@ -61,13 +61,12 @@ export default props => {
const dispatchTransaction = transaction => {
const { TrackChange } = props;
const group = "main";
const tr = TrackChange
? trackedTransaction(transaction, view.state, user, group)
: transaction;
const state = view.state.apply(tr);
view.updateState(state);
if (!tr.getMeta("fromOutsideView")) {
/*when a transaction comes from a view other than
main don't keep updating the view ,as this this
the central point of each transaction
*/
if (!transaction.getMeta("fromOutsideView")) {
context.updateView(
{
main: view
......@@ -75,6 +74,12 @@ export default props => {
"main"
);
}
const tr = TrackChange
? trackedTransaction(transaction, view.state, user, group)
: transaction;
const state = view.state.apply(tr);
view.updateState(state);
props.onChange(state.doc.content);
};
......
......@@ -42,7 +42,7 @@ export default ({ node, view }) => {
//Set everytime the active view into context
setTimeout(() => {
context.updateView({}, noteId);
}, 200);
}, 20);
if (!tr.getMeta("fromOutside")) {
let outerTr = view.state.tr,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment