We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to detect that a paste of multiple objects has completed?

Thread ID:





127567 Nov 23,2016 01:42 PM Nov 24,2016 08:29 AM JavaScript 1
Tags: ejDiagram
Jim Jacobs
Asked On November 23, 2016 01:42 PM


I have a requirement to know when a diagram.paste operation is complete.
For example, the user may perform a Select All + Copy, then move to a new diagram and perform a Paste.
This may include a few objects or hundreds of objects.
Since I display a busy screen when the paste starts, I need a way of determining that the paste of all objects is complete - so that I can hide the busy screen.

Any thoughts (code snippets)?

Thanks in advance


Shyam G [Syncfusion]
Replied On November 24, 2016 08:29 AM

Hi Jim, 

Please use command manager to achieve your requirement. Please refer to the code example and sample below. 

Code example: 

Command paste = new Command() 
                    Execute = "executepaste", 
                    CanExecute = "canexecutepaste", 
                    Gesture = new Gesture() { Key = Keys.V, KeyModifiers = KeyModifiers.Control } 
                DiagramContent.CommandManager.Commands.Add("paste", paste);     
function executepaste(args) { 
     var diagram = $("#DiagramContent").ejDiagram("instance"); 
     //you can hide the busy screen 
 function canexecutepaste(args) { 
     if (args.model.selectedItems.children.length) { 
         return true; 

Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.