File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,19 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
265265 return this ;
266266 } ,
267267
268+ /**
269+ * Returns a valid HTML canvas you can use. Internally, this may reuse an existing canvas.
270+ *
271+ * This either accepts width and height as two arguments, or you can pass in an object with "width" and "height" properties.
272+ *
273+ * @param {Number|Object } width
274+ * @param {Number } height
275+ *
276+ * @option width {Number}
277+ * @option height {Number}
278+ *
279+ * @returns {HTMLCanvasElement }
280+ */
268281 createCanvas : function ( width , height ) {
269282 return CanvasProvider . getCanvas ( width , height ) ;
270283 } ,
@@ -277,9 +290,11 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
277290 paper = this ;
278291 } ,
279292
293+ /**
294+ * Remove all projects, views and tools.
295+ * This also removes the installed event handlers.
296+ */
280297 clear : function ( ) {
281- // Remove all projects, views and tools.
282- // This also removes the installed event handlers.
283298 var projects = this . projects ,
284299 tools = this . tools ;
285300 for ( var i = projects . length - 1 ; i >= 0 ; i -- )
You can’t perform that action at this time.
0 commit comments