UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 1.03 kB
DriveComment=function(e,t,i,m,o,s,n,r){DrawioComment.call(this,e,t,i,m,o,s,n),this.pCommentId=r},mxUtils.extend(DriveComment,DrawioComment),DriveComment.prototype.addReply=function(e,t,i,m,o){var s={content:e.content};m?s.verb="resolve":o&&(s.verb="reopen"),this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:s,method:"POST"},mxUtils.bind(this,(function(e){t(e.replyId)})),i)},DriveComment.prototype.editComment=function(e,t,i){this.content=e;var m={content:e};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:m,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:m,method:"PATCH"},t,i)},DriveComment.prototype.deleteComment=function(e,t){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},e,t)};