minitel-standalone
Advanced tools
Comparing version 1.9.0 to 1.9.1
@@ -12,3 +12,2 @@ "use strict"; | ||
getDimensions(attributes, inheritMe) { | ||
console.warn('getDimensions was not implemented on this component INFORMA GET YOUR SHIT TOGETHER'); | ||
const tempRender = this.render(attributes, inheritMe); | ||
@@ -22,3 +21,10 @@ return { width: tempRender.width, height: tempRender.height }; | ||
attributes.height = attributes.height != null ? utils_js_1.padding.exludeY(attributes.height, pad) : null; | ||
let result = this.getDimensions(attributes, (0, utils_js_1.inheritedProps)(Object.assign(Object.assign(Object.assign({}, inheritedAttributes), this.attributes), forcedAttributes))); | ||
let result = { width: -1, height: -1 }; | ||
if (!attributes.height || !attributes.width) { | ||
result = this.getDimensions(attributes, (0, utils_js_1.inheritedProps)(Object.assign(Object.assign(Object.assign({}, inheritedAttributes), this.attributes), forcedAttributes))); | ||
} | ||
if (attributes.width) | ||
result.width = attributes.width; | ||
if (attributes.height) | ||
result.height = attributes.height; | ||
result.height += pad[0] + pad[2]; | ||
@@ -77,2 +83,6 @@ result.width += pad[1] + pad[3]; | ||
} | ||
if (attributes.width != null) | ||
result.setWidth(attributes.width, 'end'); | ||
if (attributes.height != null) | ||
result.setWidth(attributes.height, 'end'); | ||
// Descriptor before pad, is this the right choice? | ||
@@ -79,0 +89,0 @@ if (this.keepElmDesc) |
{ | ||
"name": "minitel-standalone", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "A standalone package for minitel components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -42,9 +42,15 @@ import { EventEmitter } from 'node:events'; | ||
attributes.height = attributes.height != null ? padding.exludeY(attributes.height, pad) : null; | ||
let result = this.getDimensions(attributes, inheritedProps({ | ||
...inheritedAttributes, | ||
...this.attributes, | ||
...forcedAttributes, | ||
})); | ||
let result: { width: number; height: number } = { width: -1, height: -1 }; | ||
if (!attributes.height || !attributes.width) { | ||
result = this.getDimensions(attributes, inheritedProps({ | ||
...inheritedAttributes, | ||
...this.attributes, | ||
...forcedAttributes, | ||
})); | ||
} | ||
if (attributes.width) result.width = attributes.width; | ||
if (attributes.height) result.height = attributes.height; | ||
result.height += pad[0] + pad[2]; | ||
@@ -114,2 +120,5 @@ result.width += pad[1] + pad[3]; | ||
if (attributes.width != null) result.setWidth(attributes.width, 'end'); | ||
if (attributes.height != null) result.setWidth(attributes.height, 'end'); | ||
// Descriptor before pad, is this the right choice? | ||
@@ -116,0 +125,0 @@ if (this.keepElmDesc) result.locationDescriptors.add(this, new LocationDescriptor(0, 0, result.width, result.height)); |
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
219200
4704