Skip to content

Add forceUpdate flag to view.update() #1913

@petbuc16

Description

@petbuc16

When I am loading a font in the background and add it to the dom afterwards, the paper view does not recognize the change.

The function update says:

update: function() {
  if (!this._needsUpdate)
	  return false; 

  var project = this._project,
	  ctx = this._context,
	  size = this._viewSize;

  ctx.clearRect(0, 0, size.width + 1, size.height + 1);

  if (project)
	  project.draw(ctx, this._matrix, this._pixelRatio);

  this._needsUpdate = false;
  return true;
}

So add a flag forceUpdate to the function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions