viewport-checker icon indicating copy to clipboard operation
viewport-checker copied to clipboard

Fixed dataset 'true' & 'false' conversions to boolean values in check()

Open michalismichailidis1999 opened this issue 2 years ago • 0 comments

Because the data values inside html elements are strings (for example data-vp-repeat="true"), boolean values won't work inside check() function since both "true" and "false" are both true statements in if (objOptions.invertBottomOffset){}. So I checked what was the value in $obj.dataset[dataKey] and if it was "true" or "false" I converted them to boolean values with the helper method I created.

I also made the demo website take the full screen because its easier to work with.

michalismichailidis1999 avatar Jul 18 '22 13:07 michalismichailidis1999