mofron-layout-margin
Advanced tools
Comparing version 0.0.5 to 0.0.7
21
index.js
@@ -11,18 +11,13 @@ /** | ||
super(); | ||
this.name('Margin'); | ||
var _tp = (undefined === tp) ? null : tp; | ||
var _val = (undefined === val) ? null : val; | ||
if (null === _tp) { | ||
throw new Error('invalid paramter'); | ||
} else if ('number' === (typeof _tp)) { | ||
_val = _tp; | ||
_tp = ''; | ||
} | ||
this.m_type = null; | ||
this.m_value = null; | ||
this.type(_tp); | ||
this.value(_val); | ||
if ('object' === typeof tp) { | ||
this.prmOpt(tp); | ||
} else { | ||
this.type(tp); | ||
this.value(val); | ||
} | ||
} catch (e) { | ||
@@ -72,3 +67,2 @@ console.error(e.stack); | ||
} | ||
if ((null === val) || ('number' !== (typeof val))) { | ||
@@ -84,1 +78,2 @@ throw new Error('invalid parameter'); | ||
} | ||
module.exports = mofron.layout.Margin; |
{ | ||
"name": "mofron-layout-margin", | ||
"version": "0.0.5", | ||
"version": "0.0.7", | ||
"description": "margin layout of mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,1 +0,22 @@ | ||
# mofron-layout-margin | ||
# mofron-layout-margin | ||
margin layout for [mofron](https://github.com/simpart/mofron).<br> | ||
# Install | ||
```bash | ||
mofron install mofron-layout-padding | ||
``` | ||
# Sample | ||
```javascript | ||
require('mofron'); | ||
let Text = require('mofron-comp-text'); | ||
let Margin = require('mofron-layout-margin'); | ||
new mofron.Component({ | ||
layout : new Margin('left',100), // margin layout | ||
child : [new Text('child 1'), | ||
new Text('child 2'), | ||
new Text('child 3')], | ||
visible : true | ||
}); | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4089
23
0
70