dynamic-marquee
Advanced tools
Comparing version 2.6.4 to 2.6.5
@@ -201,9 +201,2 @@ (function (global, factory) { | ||
var PX_REGEX = /px$/; | ||
function pxStringToValue(input) { | ||
if (!PX_REGEX.test(input)) { | ||
throw new Error('String missing `px` suffix'); | ||
} | ||
return parseFloat(input.slice(0, -2)); | ||
} | ||
var SizeWatcher = /*#__PURE__*/function () { | ||
@@ -232,5 +225,3 @@ function SizeWatcher($el) { | ||
if (this._width !== null) return this._width; | ||
// maps to `inlineSize` | ||
var width = pxStringToValue(window.getComputedStyle(this._$el).width); | ||
var width = this._$el.getBoundingClientRect().width; | ||
if (this._observer) this._width = width; | ||
@@ -243,5 +234,3 @@ return width; | ||
if (this._height !== null) return this._height; | ||
// maps to `blockSize` | ||
var height = pxStringToValue(window.getComputedStyle(this._$el).height); | ||
var height = this._$el.getBoundingClientRect().height; | ||
if (this._observer) this._height = height; | ||
@@ -248,0 +237,0 @@ return height; |
{ | ||
"name": "dynamic-marquee", | ||
"version": "2.6.4", | ||
"version": "2.6.5", | ||
"description": "A small library for creating marquees.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/dynamic-marquee.js", |
Sorry, the diff of this file is not supported yet
92441
1977