From 95a58544cfd3d9baa824b07eec8fa8a63f2f8c8a Mon Sep 17 00:00:00 2001 From: Mohammad Amoush Date: Thu, 11 Jul 2019 17:12:51 -0400 Subject: Documentation and refactoring left --- .../views/presentationview/PresentationElement.tsx | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/presentationview/PresentationElement.tsx b/src/client/views/presentationview/PresentationElement.tsx index 0ba03d78a..733bbff13 100644 --- a/src/client/views/presentationview/PresentationElement.tsx +++ b/src/client/views/presentationview/PresentationElement.tsx @@ -574,12 +574,16 @@ export default class PresentationElement extends React.Component 1) { + let newGroupGuid = Utils.GenerateGuid(); + firstPart.forEach((doc: Doc) => doc.presentId = newGroupGuid); + this.props.groupMappings.set(newGroupGuid, firstPart); + } + } + //Error here: You Should splice the beforehand things as well, if present!! groupArray.splice(groupArray.indexOf(droppedDoc), 1); if (groupArray.length === 0) { this.props.groupMappings.delete(curDocGuid); } droppedDoc.presentId = Utils.GenerateGuid(); + //let droppedDocIndex = this.props.allListElements.indexOf(droppedDoc); let indexOfBelow = droppedDocIndex + 1; if (indexOfBelow < this.props.allListElements.length && indexOfBelow > 1) { @@ -613,15 +630,17 @@ export default class PresentationElement extends React.Component doc.presentId = aboveBelowDocPresId); + } } else { belowDocGroup.unshift(aboveBelowDoc); -- cgit v1.2.3-70-g09d2