@lemonadejs/modal 2.4.0 → 2.4.1

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/dist/index.js CHANGED
@@ -246,12 +246,6 @@ if (!lemonade && typeof (require) === 'function') {
246
246
  });
247
247
  }
248
248
 
249
- // Initial centralize
250
- if (self.center === true) {
251
- self.top = (window.innerHeight - self.el.offsetHeight) / 2;
252
- self.left = (window.innerWidth - self.el.offsetWidth) / 2;
253
- }
254
-
255
249
  // Dimensions
256
250
  if (self.width) {
257
251
  self.el.style.width = self.width + 'px';
@@ -270,6 +264,12 @@ if (!lemonade && typeof (require) === 'function') {
270
264
  self.el.style.left = self.left + 'px';
271
265
  }
272
266
 
267
+ // Initial centralize
268
+ if (self.center === true) {
269
+ self.top = (window.innerHeight - self.el.offsetHeight) / 2;
270
+ self.left = (window.innerWidth - self.el.offsetWidth) / 2;
271
+ }
272
+
273
273
  // Full screen
274
274
  if (self.height > 300) {
275
275
  self.el.classList.add('fullscreen');
package/dist/style.css CHANGED
@@ -1,5 +1,5 @@
1
1
  .lm-modal {
2
- position: absolute;
2
+ position: fixed;
3
3
  min-width: 300px;
4
4
  min-height: 240px;
5
5
  border-radius: 5px;
@@ -12,10 +12,7 @@
12
12
  will-change: transform;
13
13
  border: 1px solid #bbb;
14
14
  outline: none;
15
- }
16
-
17
- .lm-modal[center] {
18
- position: fixed;
15
+ margin: 0;
19
16
  }
20
17
 
21
18
  .lm-modal-backdrop {
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  },
18
18
  "main": "dist/index.js",
19
19
  "types": "dist/index.d.ts",
20
- "version": "2.4.0"
20
+ "version": "2.4.1"
21
21
  }