a-frame-components
Advanced tools
Comparing version 1.0.317 to 1.0.321
@@ -27,7 +27,8 @@ var __assign = (this && this.__assign) || function () { | ||
var _a; | ||
return parseFloat("".concat((_a = this === null || this === void 0 ? void 0 : this.container) === null || _a === void 0 ? void 0 : _a.getAttribute('menu-item-width'))); | ||
return parseFloat("".concat(((_a = this === null || this === void 0 ? void 0 : this.container) === null || _a === void 0 ? void 0 : _a.getAttribute('menu-item-width')) || 0)); | ||
}, getHeight: function () { | ||
var _a; | ||
return parseFloat("".concat((_a = this === null || this === void 0 ? void 0 : this.container) === null || _a === void 0 ? void 0 : _a.getAttribute('menu-item-height'))); | ||
return parseFloat("".concat(((_a = this === null || this === void 0 ? void 0 : this.container) === null || _a === void 0 ? void 0 : _a.getAttribute('menu-item-height')) || 0)); | ||
}, render: function () { | ||
var _this = this; | ||
var el = this.el; | ||
@@ -43,3 +44,4 @@ var me = this; | ||
container_1.setAttribute('forward-step', '0.05'); | ||
container_1.setAttribute('text-value', this.data.value || '-- - Select-- - '); | ||
var option = options.find(function (font) { return font.value === _this.data.value; }); | ||
container_1.setAttribute('text-value', (option === null || option === void 0 ? void 0 : option.name) || this.data.value || '-- - Select-- - '); | ||
container_1.setAttribute('menu-direction', 'down'); | ||
@@ -56,3 +58,3 @@ container_1.setAttribute('flex-direction', 'column'); | ||
menuItem.setAttribute('font-size', '.07'); | ||
menuItem.setAttribute('value', font.name); | ||
menuItem.setAttribute('value', font.value); | ||
menuItem.setAttribute('title', font.name); | ||
@@ -59,0 +61,0 @@ menuItem.setAttribute('interactive-type', 'button'); |
{ | ||
"name": "a-frame-components", | ||
"version": "1.0.317", | ||
"version": "1.0.321", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -24,6 +24,6 @@ | ||
getWidth: function () { | ||
return parseFloat(`${this?.container?.getAttribute('menu-item-width')}`); | ||
return parseFloat(`${this?.container?.getAttribute('menu-item-width') || 0}`); | ||
}, | ||
getHeight: function () { | ||
return parseFloat(`${this?.container?.getAttribute('menu-item-height')}`); | ||
return parseFloat(`${this?.container?.getAttribute('menu-item-height') || 0}`); | ||
}, | ||
@@ -39,6 +39,6 @@ render: function () { | ||
} | ||
const container = document.createElement('frame-menu-container'); | ||
container.setAttribute('forward-step', '0.05'); | ||
container.setAttribute('text-value', this.data.value || '-- - Select-- - '); | ||
let option = options.find((font) => font.value === this.data.value) | ||
container.setAttribute('text-value', option?.name || this.data.value || '-- - Select-- - '); | ||
container.setAttribute('menu-direction', 'down'); | ||
@@ -52,7 +52,6 @@ container.setAttribute('flex-direction', 'column'); | ||
this.container = container; | ||
options.forEach((font) => { | ||
const menuItem = document.createElement('frame-base-interactive'); // Assuming 'frame-base-interactive' is a custom component or styled div | ||
menuItem.setAttribute('font-size', '.07'); | ||
menuItem.setAttribute('value', font.name); | ||
menuItem.setAttribute('value', font.value); | ||
menuItem.setAttribute('title', font.name); | ||
@@ -59,0 +58,0 @@ menuItem.setAttribute('interactive-type', 'button'); |
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
1783372
30479