Skip to content

Cannot extend Rectangle? #273

@rcarmo

Description

@rcarmo
  • Version: 2.6.7
  • macOS: 11.4

So I'm trying to extend Rectangle:

Rectangle.prototype.pad = () => {
	return new Rectangle(
		this.x + PADDING/2, 
		this.y + PADDING/2,
		this.width - PADDING,
		this.height - PADDING
	);
};

... and I get ReferenceError: Can't find variable: Rectangle (Line:Column)

Since I can hack Screen, shouldn't I be able to do the same for Rectangle, so that I can take a Window.frame and manipulate it directly like this?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions