MCPcopy Create free account
hub / github.com/graphif/project-graph / translate

Method translate

packages/shapes/src/Rectangle.ts:398–400  ·  view source on GitHub ↗
(offset: Vector)

Source from the content-addressed store, hash-verified

396 }
397
398 public translate(offset: Vector): Rectangle {
399 return new Rectangle(this.location.add(offset), this.size);
400 }
401
402 public limit(limit: Rectangle): Rectangle {
403 const left = Math.max(limit.left, this.left);

Callers 4

onMouseMoveFunction · 0.80
onTouchMoveFunction · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected