Canvas
Properties
record
required
quip.apps.CanvasRecord
A CanvasRecord object that acts as the data store for the Canvas.
isInCommentMode
optional
boolean = false
Set to true
if the user is adding a CommentsTrigger to the Canvas. This causes the Live App to show a comment bubble that follows the mouse. This behavior is only supported for Canvases that cover the entire Live App. Otherwise, use quip.apps.ui.Canvas.prototype.addCommentAtPoint
.
onCommentAdd
optional
Function() => void
A callback when a CommentAnchor is added when isInCommentMode
is true. You should pass false
for isInCommentMode
after this.
cancelCommentMode
optional
Function() => void
A callback when the user cancels out of adding a comment bubble from isInCommentMode
true. You should pass false
for isInCommentMode
after this.
isCommentAnchorValidCallback
optional
Function(anchor: quip.apps.ui.Canvas.CommentAnchorRecord) => boolean
A callback used to flag comment anchors not in valid locations. This is used by <quip.apps.ui.Image/>
to show which comment anchors will be removed if a crop is committed. Takes a quip.apps.ui.Canvas.CommentAnchorRecord
object as an argument. Expects to have a boolean
returned where false means to display the red, cross-out bubble. If not passed in, all comment anchors are assumed to be in valid locations.