Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. saveMapAsReceipt(callback) {
  2.     console.log("test");
  3.     this.printPlugin.printMap('A4Portrait page', 'Miles');
  4.     this.routingMap.on('easyPrint-finished', e => {
  5.         console.log(e.event);
  6.  
  7.         var reader = new FileReader();
  8.         reader.readAsDataURL(e.event);
  9.         reader.onloadend = function() {
  10.             base64data = reader.result;
  11.             console.log(base64data);
  12.             this.receipt_source = base64data;
  13.         }
  14.  
  15.  
  16.         callback();
  17.  
  18.     });
  19.     },
  20.     submit : function(){
  21.     console.log("test hehe");
  22.     this.saveMapAsReceipt(this.$refs.update.submit());
  23.     console.log("hehe");
  24.  
  25.     },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement