The PixelPaper JavaScript object comes with a bunch of handy, accessible methods that you can use to create custom workflows and experiences for your users. We've documented these below. Please note, this is an incomplete list! If you'd like lower-level access to PixelPaper's features, drop us an email.
Undo an Action
Undoes this user's most recent action.
Redo an Action
Redoes this user's most recent action.
Re-center View
Adjusts the user's view so they can see everything currently on the board (useful if they're "lost").
Draw a Line
Draws a line from start_point to point_b.
Note: each point is an object with the coordinates keys x and y, like so:
x: 123,
y: 300
}
Draw Rectangle
Draws a rectangle on this user's whiteboard.
Draw Ellipse
Draws a ellipse on this user's whiteboard. The x_coordinate and y_coordinate make up the top-left coordinate of the 'box' containing the ellipse.
The radius_x and radius_y control the width and height of the ellipse.
Zoom In
Zooms in 2% on the board.
Zoom Out
Zooms out 2% on the board.
Disconnect
Disconnects this user from the PixelPaper and destroys the containing div.