Skip to main content
Firewood:D
Inspiring
March 15, 2024
Question

Wrong jsfl needs to be improved? Remaining image after undoing the operation

  • March 15, 2024
  • 0 replies
  • 122 views

Hi, I created a small script for my work that worked fine until recently when I discovered a problem.
When I run the jsfl file under the commands folder, once I perform a Ctrl+Z undo operation, an irreversible residue appears on the screen.

No matter what I do, the residue appears whenever I use Ctrl+Z. 

Can this problem be solved, or is it inevitable?

code:

fl.getDocumentDOM().clipCopy();
fl.createDocument();
fl.getDocumentDOM().clipPaste();
fl.getDocumentDOM().library.selectAll();

var lib = fl.getDocumentDOM().library;
for(var i in lib) for(var j in lib[i])
 lib[i][j].name = 'fl' + Math.floor(Math.random()*100000) + '_' + Math.floor(Math.random()*100000);

//Paste the object into the original document
fl.getDocumentDOM().clipCopy();
fl.closeDocument(fl.getDocumentDOM(), false);
fl.getDocumentDOM().clipPaste();

 

This topic has been closed for replies.