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

pass viewId

parent 70a19e4f
No related branches found
No related tags found
1 merge request!543pass viewId
......@@ -99,6 +99,7 @@ const markDeletion = (tr, from, to, user, date, group, viewId) => {
node.type.name === 'figure'
) {
const track = node.attrs.track.slice();
console.log('viewId', viewId);
track.push({
type: 'deletion',
user: user.userId,
......@@ -108,6 +109,7 @@ const markDeletion = (tr, from, to, user, date, group, viewId) => {
group,
viewid: viewId,
});
console.log('track', track);
tr.setNodeMarkup(
deletionMap.map(pos),
null,
......@@ -115,6 +117,7 @@ const markDeletion = (tr, from, to, user, date, group, viewId) => {
track,
group,
id: uuidv4(),
viewid: viewId,
}),
// Object.assign(node.attrs.track, { track }),
node.marks,
......
......@@ -68,7 +68,9 @@ const replaceStep = (
}
}
if (step.from !== step.to) {
map.appendMap(markDeletion(newTr, step.from, step.to, user, date, group));
map.appendMap(
markDeletion(newTr, step.from, step.to, user, date, group, viewId),
);
}
};
......
......@@ -58,6 +58,8 @@ export default ({ trackChangeId, top, recalculateTops, trackChange }) => {
};
const focusOnBlcock = trackData => {
console.log(trackData);
console.log(pmViews, viewId);
pmViews[viewId].dispatch(
pmViews[viewId].state.tr.setSelection(
new TextSelection(
......
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