Requires

Provides

Offset.js

Positions layer around the canvas

License:
Public domain (http://unlicense.org).
Authors:
Yaroslaff Fedin
  1. 21
  2. 22
  3. 23
  4. 24
  5. 25
  6. 26
  7. 27
  8. 28
  9. 29
  10. 30
  11. 31
  12. 32
  13. 33
  14. 34
  15. 35
  16. 36
  17. 37
  18. 38
LSD.Layer.Offset = { properties: { offset: [['top', 'right', 'bottom', 'left']], top: ['length', 'percentage'], left: ['length', 'percentage'], bottom: ['length', 'percentage'], right: ['length', 'percentage'], }, paint: function(top, right, bottom, left) { return { move: { x: left == null && right != null ? (this.size.width - (right || 0)) : (left || 0), y: top == null && bottom != null ? (this.size.height - (bottom || 0)) : (top || 0) } } } };