mofron-layout-margin
Advanced tools
Comparing version 0.2.0 to 0.2.1
22
index.js
@@ -6,4 +6,5 @@ /** | ||
*/ | ||
const mf = require('mofron'); | ||
mofron.layout.Margin = class extends mofron.Layout { | ||
mf.layout.Margin = class extends mf.Layout { | ||
constructor (po, p2) { | ||
@@ -25,3 +26,3 @@ try { | ||
let setmgn = {}; | ||
setmgn[mg] = ('number' !== typeof this.value()) ? this.value() : this.value() + 'rem'; | ||
setmgn[mg] = this.value().toString(); | ||
tgt.adom().style(setmgn); | ||
@@ -41,10 +42,8 @@ } catch (e) { | ||
/* setter */ | ||
if ( ('string' !== typeof prm) || | ||
( ('top' !== prm) && | ||
('right' !== prm) && | ||
('bottom' !== prm) && | ||
('left' !== prm) ) ) { | ||
if ( ('top' !== prm) && | ||
('right' !== prm) && | ||
('bottom' !== prm) && | ||
('left' !== prm) ) { | ||
throw new Error('invalid parameter'); | ||
} | ||
this.m_type = prm; | ||
@@ -64,6 +63,3 @@ } catch (e) { | ||
/* setter */ | ||
if (('string' !== typeof prm) && ('number' !== typeof prm)) { | ||
throw new Error('invalid parameter'); | ||
} | ||
this.m_value = prm; | ||
this.m_value = mf.func.getSizeObj(prm); | ||
} catch (e) { | ||
@@ -75,3 +71,3 @@ console.error(e.stack); | ||
} | ||
module.exports = mofron.layout.Margin; | ||
module.exports = mf.layout.Margin; | ||
/* end of file */ |
{ | ||
"name": "mofron-layout-margin", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "margin layout of mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
3935
64