This is regarding the copyPaste handlers.. So how do I know, whether the action is CUT or COPY? It seems like both these actions call this handler.. I need to set a different ID if the action is COPY....

This is an auto-generated question from the MPS Slack community: This is regarding the copyPaste handlers.. So how do I know, whether the action is CUT or COPY? It seems like both these actions call this handler.. I need to set a different ID if the action is COPY.. if cut, I can just let it paste... Please let me know if there is a way to find it out.. I tried to iterate thorough the nodes and compare the ID of each node across the 'pasted node' I thought the cut node id will not be present in the list.. but NO, even though the node appears cut, it is still present in the node list, so this approach was not useful... please help!
2 comments
Comment actions Permalink
I solved it like this.. I checked for the occurance of the pasted node ID and checked for the count. Based on that I set a flag whether its cut or copy.. And accordingly I created a new ID for the pasted node in case of copy and in case of cut I didnt do anything, so it just pasted itself.
0
Comment actions Permalink
This is auto-generated question from the MPS Community Slack Workspace. If you want to comment on the question, do it from the Slack workspace
0

Post is closed for comments.