Comparing version 1.0.0 to 1.0.1
@@ -103,10 +103,9 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.raterJs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
var width = elem.offsetWidth; | ||
var parentOffset = elem.getBoundingClientRect(); | ||
if (reverse) { | ||
var parentOffset = elem.getBoundingClientRect(); | ||
if (isTouch) { | ||
xCoor = e.changedTouches[0].pageX - parentOffset.left; | ||
} else { | ||
xCoor = e.pageX - parentOffset.left; | ||
xCoor = e.pageX - window.scrollX - parentOffset.left; | ||
} | ||
@@ -119,3 +118,3 @@ | ||
if (isTouch) { | ||
xCoor = e.changedTouches[0].pageX - e.changedTouches[0].target.offsetLeft; | ||
xCoor = e.changedTouches[0].pageX - parentOffset.left; | ||
} else { | ||
@@ -122,0 +121,0 @@ xCoor = e.offsetX; |
@@ -99,9 +99,9 @@ /*! rater-js. [c] 2018 Fredrik Olsson. MIT License */ | ||
let width = elem.offsetWidth; | ||
let parentOffset = elem.getBoundingClientRect(); | ||
if (reverse) { | ||
let parentOffset = elem.getBoundingClientRect(); | ||
if(isTouch) { | ||
xCoor = e.changedTouches[0].pageX - parentOffset.left; | ||
} else { | ||
xCoor = e.pageX - parentOffset.left; | ||
xCoor = e.pageX - window.scrollX - parentOffset.left; | ||
} | ||
@@ -115,3 +115,3 @@ | ||
if(isTouch) { | ||
xCoor = e.changedTouches[0].pageX - e.changedTouches[0].target.offsetLeft; | ||
xCoor = e.changedTouches[0].pageX - parentOffset.left; | ||
} else { | ||
@@ -118,0 +118,0 @@ xCoor = e.offsetX; |
{ | ||
"name": "rater-js", | ||
"description": "Star rating widget for the browser.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"repository": { | ||
@@ -34,12 +34,12 @@ "type": "git", | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0-beta.47", | ||
"@babel/preset-env": "^7.0.0-beta.47", | ||
"babelify": "^9.0.0", | ||
"browserify": "^16.1.1", | ||
"browserify-css": "^0.14.0", | ||
"@babel/core": "^7.5.0", | ||
"@babel/preset-env": "^7.5.2", | ||
"babelify": "^10.0.0", | ||
"browserify": "^16.3.0", | ||
"browserify-css": "^0.15.0", | ||
"ignore-styles": "^5.0.1", | ||
"jsdom": "^11.6.2", | ||
"mocha": "^5.0.5", | ||
"sinon": "^4.5.0" | ||
"jsdom": "^15.1.1", | ||
"mocha": "^6.1.4", | ||
"sinon": "^7.3.2" | ||
} | ||
} |
@@ -13,2 +13,4 @@ Rater Js | ||
*The author is looking for consulting work implementing anything with his open source libraries or other stuff. I do javascript/php/wordpress/c#/asp.net. I have over 10 years experience with software development. Keep in mind that I only work remotely.* | ||
### Main features: | ||
@@ -127,2 +129,2 @@ | ||
[downloads-image]: http://img.shields.io/npm/dm/rater-js.svg?style=flat-square | ||
[downloads-url]: https://npmjs.org/package/rater-js | ||
[downloads-url]: https://npmjs.org/package/rater-js |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
255750
6246
129
0