Sha256: bc47c9243fdf778c6c20069a05bf9752bfd5dcfbde9780bf3fb150489169148b

Contents?: true

Size: 681 Bytes

Versions: 7

Compression:

Stored size: 681 Bytes

Contents

/*
---
 
script: Shadow.Native.js
 
description: CSS powered shadow
 
license: Public domain (http://unlicense.org).

authors: Yaroslaff Fedin
 
requires:
- LSD.Layer.Shadow
 
provides: [LSD.Layer.Shadow.Native]
 
...
*/

LSD.Layer.Shadow.Native = new Class({
  //Extends: LSD.Layer,

  paint: function(color, blur, x, y, stroke) {
    var widget = this.base.widget;
    var element = widget.toElement();
    element.set('borderRadius', widget.getStyle('cornerRadius'));
    element.set('boxShadow', {color: color, blur: blur, x: x, y: y})
  },
  
  eject: function() {
    var widget = this.base.widget;
    var element = widget.element;
    element.set('boxShadow', false)
  }
})

Version data entries

7 entries across 7 versions & 1 rubygems

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