@micromag/element-background 0.3.4 → 0.3.10
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.
- package/es/index.js +2 -2
- package/lib/index.js +2 -2
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -93,12 +93,12 @@ var Background = function Background(_ref) {
|
|
|
93
93
|
url: mediaThumbnailUrl
|
|
94
94
|
} : media, width, height);
|
|
95
95
|
containerStyle.backgroundImage = finalUrl !== null && finalShouldLoad ? "url(\"".concat(finalUrl, "\")") : null;
|
|
96
|
-
containerStyle.backgroundRepeat = repeat ? 'repeat' : 'no-repeat';
|
|
96
|
+
containerStyle.backgroundRepeat = repeat && !isVideo ? 'repeat' : 'no-repeat';
|
|
97
97
|
containerStyle.backgroundPosition = [horizontalAlign, verticalAlign].join(' ');
|
|
98
98
|
|
|
99
99
|
if (fit !== null) {
|
|
100
100
|
containerStyle.backgroundSize = fit;
|
|
101
|
-
} else if (!repeat) {
|
|
101
|
+
} else if (!repeat || isVideo) {
|
|
102
102
|
containerStyle.backgroundSize = 'cover';
|
|
103
103
|
}
|
|
104
104
|
} // video
|
package/lib/index.js
CHANGED
|
@@ -107,12 +107,12 @@ var Background = function Background(_ref) {
|
|
|
107
107
|
url: mediaThumbnailUrl
|
|
108
108
|
} : media, width, height);
|
|
109
109
|
containerStyle.backgroundImage = finalUrl !== null && finalShouldLoad ? "url(\"".concat(finalUrl, "\")") : null;
|
|
110
|
-
containerStyle.backgroundRepeat = repeat ? 'repeat' : 'no-repeat';
|
|
110
|
+
containerStyle.backgroundRepeat = repeat && !isVideo ? 'repeat' : 'no-repeat';
|
|
111
111
|
containerStyle.backgroundPosition = [horizontalAlign, verticalAlign].join(' ');
|
|
112
112
|
|
|
113
113
|
if (fit !== null) {
|
|
114
114
|
containerStyle.backgroundSize = fit;
|
|
115
|
-
} else if (!repeat) {
|
|
115
|
+
} else if (!repeat || isVideo) {
|
|
116
116
|
containerStyle.backgroundSize = 'cover';
|
|
117
117
|
}
|
|
118
118
|
} // video
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-background",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/runtime": "^7.13.10",
|
|
50
50
|
"@folklore/size": "^0.1.15",
|
|
51
|
-
"@micromag/core": "^0.3.
|
|
52
|
-
"@micromag/element-video": "^0.3.
|
|
51
|
+
"@micromag/core": "^0.3.10",
|
|
52
|
+
"@micromag/element-video": "^0.3.10",
|
|
53
53
|
"classnames": "^2.2.6",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"prop-types": "^15.7.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "86e11f1f28cd844b3fde4718ac7ddfcb9585e7c6"
|
|
63
63
|
}
|