mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
parent
593590d707
commit
8174405924
2 changed files with 12 additions and 5 deletions
|
@ -109,13 +109,17 @@ var CanvasView = View.extend(/** @lends CanvasView# */{
|
|||
},
|
||||
|
||||
/**
|
||||
* Updates the view if there are changes.
|
||||
* Updates the view if there are changes. Note that when using built-in
|
||||
* event hanlders for interaction, animation and load events, this method is
|
||||
* invoked for you automatically at the end.
|
||||
*
|
||||
* @function
|
||||
* @param {Boolean} [force=false] {@true if the view should be updated even
|
||||
* if no change has happened}
|
||||
* @return {Boolean} {@true if the view was updated}
|
||||
*/
|
||||
update: function() {
|
||||
update: function(force) {
|
||||
var project = this._project;
|
||||
if (!project || !project._needsUpdate)
|
||||
if (!project || !force && !project._needsUpdate)
|
||||
return false;
|
||||
// Initial tests conclude that clearing the canvas using clearRect
|
||||
// is always faster than setting canvas.width = canvas.width
|
||||
|
|
|
@ -457,8 +457,11 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
|||
*
|
||||
* @name View#update
|
||||
* @function
|
||||
* @param {Boolean} [force=false] {@true if the view should be updated even
|
||||
* if no change has happened}
|
||||
* @return {Boolean} {@true if the view was updated}
|
||||
*/
|
||||
// update: function() {
|
||||
// update: function(force) {
|
||||
// },
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue