layerCenter property
The layer's center in canvas coordinates (origin top-left).
Combined with canvasSize this lets the slide animation translate the layer just far enough for its edge to leave (or enter from) the canvas.
Implementation
final Offset layerCenter;