a-frame-components
Advanced tools
Comparing version 1.0.342 to 1.0.343
@@ -0,1 +1,2 @@ | ||
import { watchAttribute } from "a-frame-components"; | ||
import { AFRAME } from "../../react/root"; | ||
@@ -11,3 +12,18 @@ import { GetColor } from "../../react/systems/ui"; | ||
var me = this; | ||
var _a = JSON.parse(this.data.options), guiItem = _a.guiItem, value = _a.value, id = _a.id, text = _a.text, url = _a.url, imageMargin = _a.imageMargin; // Component data | ||
var el = this.el; | ||
watchAttribute(el, { | ||
'options': function (name, v, el) { | ||
var guiItem = v.guiItem, value = v.value, id = v.id, text = v.text, url = v.url, imageMargin = v.imageMargin; // Component data | ||
me.render({ guiItem: guiItem, value: value, id: id, text: text, url: url, imageMargin: imageMargin }); | ||
} | ||
}); | ||
if (this.data.options) { | ||
var _a = JSON.parse(this.data.options), guiItem = _a.guiItem, value = _a.value, id = _a.id, text = _a.text, url = _a.url, imageMargin = _a.imageMargin; // Component data | ||
me.render({ guiItem: guiItem, value: value, id: id, text: text, url: url, imageMargin: imageMargin }); | ||
} | ||
}, | ||
render: function (_a) { | ||
var guiItem = _a.guiItem, value = _a.value, id = _a.id, text = _a.text, url = _a.url, imageMargin = _a.imageMargin; | ||
var me = this; | ||
var el = this.el; | ||
me.imageMargin = imageMargin; | ||
@@ -90,15 +106,2 @@ me.guiItem = guiItem; | ||
return entity; | ||
// <frame-menu-container | ||
// ref={menuContainerRef} | ||
// menu-direction={'up'} | ||
// flex-direction="column" | ||
// justify-content="flexStart" | ||
// align-items="flexStart" | ||
// component-padding="0.01" | ||
// width="4" | ||
// text-value="All Images" | ||
// menu-item-height={.2} | ||
// menu-item-width={1.0} | ||
// position="0 0 0" rotation="0 180 0" | ||
// > | ||
}, | ||
@@ -105,0 +108,0 @@ createText: function (newText) { |
{ | ||
"name": "a-frame-components", | ||
"version": "1.0.342", | ||
"version": "1.0.343", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,1 +1,2 @@ | ||
import { watchAttribute } from "a-frame-components"; | ||
import { AFRAME } from "../../react/root"; | ||
@@ -11,3 +12,19 @@ import { GetColor } from "../../react/systems/ui"; | ||
let me = this; | ||
let { guiItem, value, id, text, url, imageMargin } = JSON.parse(this.data.options); // Component data | ||
var el = this.el; | ||
watchAttribute(el, { | ||
'options': (name, v, el) => { | ||
let { guiItem, value, id, text, url, imageMargin } = v; // Component data | ||
me.render({ guiItem, value, id, text, url, imageMargin }); | ||
} | ||
}); | ||
if (this.data.options) { | ||
let { guiItem, value, id, text, url, imageMargin } = JSON.parse(this.data.options); // Component data | ||
me.render({ guiItem, value, id, text, url, imageMargin }); | ||
} | ||
}, | ||
render: function ({ guiItem, value, id, text, url, imageMargin }: any) { | ||
let me = this; | ||
var el = this.el; | ||
me.imageMargin = imageMargin; | ||
@@ -95,15 +112,2 @@ me.guiItem = guiItem; | ||
return entity; | ||
// <frame-menu-container | ||
// ref={menuContainerRef} | ||
// menu-direction={'up'} | ||
// flex-direction="column" | ||
// justify-content="flexStart" | ||
// align-items="flexStart" | ||
// component-padding="0.01" | ||
// width="4" | ||
// text-value="All Images" | ||
// menu-item-height={.2} | ||
// menu-item-width={1.0} | ||
// position="0 0 0" rotation="0 180 0" | ||
// > | ||
}, | ||
@@ -110,0 +114,0 @@ createText: function (newText) { |
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
1794936
30713