Sha256: 9ff321d1a96e432c7f51bd598b73caa9d1f5156cc3efdf1ac86a85bfd38be33d

Contents?: true

Size: 581 Bytes

Versions: 7

Compression:

Stored size: 581 Bytes

Contents

/*
---
 
script: Position.js
 
description: Positions layer in the box
 
license: Public domain (http://unlicense.org).

authors: Yaroslaff Fedin
 
requires:
  - LSD.Layer
 
provides: 
  - LSD.Layer.Position
 
...
*/

LSD.Layer.Position = {
  properties: {
    position: [['x', 'y']],
    x:        ['length', 'percentage', 'left', 'right', 'center'],
    y:        ['length', 'percentage', 'top', 'bottom', 'center']
  },
  
  
  paint: function(x, y) {
    if (!x && !y) return;
    return {
      move: LSD.position(this.box, this.size, x || 'center', y || 'center')
    }
  }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lsd_rails-0.1.6 Packages/lsd/Source/Layer/Position.js
lsd_rails-0.1.5 Packages/lsd/Source/Layer/Position.js
lsd_rails-0.1.4 Packages/lsd/Source/Layer/Position.js
lsd_rails-0.1.3 Packages/lsd/Source/Layer/Position.js
lsd_rails-0.1.2 Packages/lsd/Source/Layer/Position.js
lsd_rails-0.1.1 Packages/lsd/Source/Layer/Position.js
lsd_rails-0.1 Packages/lsd/Source/Layer/Position.js