studiokit-scaffolding-js 4.5.3-next.2.2 → 4.5.3-next.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,9 +60,9 @@ var Image = /** @class */ (function (_super) {
|
|
|
60
60
|
}
|
|
61
61
|
/** Creates the DOM Node from a value */
|
|
62
62
|
Image.create = function (value) {
|
|
63
|
-
var _a, _b;
|
|
63
|
+
var _a, _b, _c;
|
|
64
64
|
var node = _super.create.call(this, this.tagName);
|
|
65
|
-
if (value.alt) {
|
|
65
|
+
if ((_a = value.alt) === null || _a === void 0 ? void 0 : _a.trim()) {
|
|
66
66
|
node.setAttribute('alt', value.alt);
|
|
67
67
|
}
|
|
68
68
|
else {
|
|
@@ -70,8 +70,8 @@ var Image = /** @class */ (function (_super) {
|
|
|
70
70
|
}
|
|
71
71
|
node.setAttribute('src', value.src);
|
|
72
72
|
// Setting up the height and width to be reactive when an image is getting resize
|
|
73
|
-
node.setAttribute('height', (
|
|
74
|
-
node.setAttribute('width', (
|
|
73
|
+
node.setAttribute('height', (_b = value.height) !== null && _b !== void 0 ? _b : 'auto');
|
|
74
|
+
node.setAttribute('width', (_c = value.width) !== null && _c !== void 0 ? _c : 'auto');
|
|
75
75
|
return node;
|
|
76
76
|
};
|
|
77
77
|
/** Returns the value for a DOM Node */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiokit-scaffolding-js",
|
|
3
|
-
"version": "4.5.3-next.2.
|
|
3
|
+
"version": "4.5.3-next.2.3",
|
|
4
4
|
"description": "Common scaffolding for Studio apps at Purdue",
|
|
5
5
|
"repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
|
|
6
6
|
"license": "MIT",
|