daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest May 17th, 2018 100 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $('.remove-selected').on('click', function(){
  2.     deleteObjects();
  3. })
  4. function deleteObjects(){
  5.   var activeObject = canvas.getActiveObject();
  6.    if (activeObject['_objects'] === undefined) {
  7.        canvas.remove(activeObject);
  8.    }else{
  9.      for(var i=0; Object.keys(activeObject['_objects']).length > i;i++){
  10.         canvas.discardActiveObject();
  11.         canvas.remove(activeObject['_objects'][i]);
  12.       }  
  13.   }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top